﻿
/*
#**************************************************************************
#  openSIS is a student information system for public and non-public 
#  schools from Open Solutions for Education, Inc. web: www.os4ed.com
#
#  openSIS is  web-based, open source, and comes packed with features that 
#  include student demographic info, scheduling, grade book, attendance, 
#  report cards, eligibility, transcripts, parent portal, 
#  student portal and more.   
#
#  Visit the openSIS web site at http://www.opensis.com to learn more.
#  If you have question regarding this system or the license, please send 
#  an email to info@os4ed.com.
#
#  This program is released under the terms of the GNU General Public License  
#  as  published by the Free Software Foundation, version 2 of the License. 
#  See license.txt.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
#**************************************************************************** 

*/






DROP TABLE IF EXISTS `studentsetup_controls`;
CREATE TABLE `studentsetup_controls` (
  `control_id` INT(10) NOT NULL,
  `control_name` VARCHAR(50) CHARACTER SET utf8   NULL
)
ENGINE = INNODB;






DROP TABLE IF EXISTS `SubMenu_Multilingual`;
CREATE TABLE `SubMenu_Multilingual` (
  `SubMenu_id` CHAR(10) CHARACTER SET utf8   NOT NULL,
  `Main_menu_id` CHAR(10) CHARACTER SET utf8   NULL,
  `SubMenu_Header` LONGTEXT CHARACTER SET utf8   NULL,
  `URL` LONGTEXT CHARACTER SET utf8   NULL,
  `Visible` CHAR(10) CHARACTER SET utf8   NULL
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `SubMenu_Child_Multilingual`;
CREATE TABLE `SubMenu_Child_Multilingual` (
  `SubMenu_Child_Id` CHAR(10) CHARACTER SET utf8   NOT NULL,
  `SubMenu_Id` CHAR(10) CHARACTER SET utf8   NULL,
  `SubMenu_Child_Header` LONGTEXT CHARACTER SET utf8   NULL,
  `URL` LONGTEXT CHARACTER SET utf8   NULL,
  `Visible` CHAR(10) CHARACTER SET utf8   NULL
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `subject`;
CREATE TABLE `subject` (
  `sbj_id` INT(10) NOT NULL,
  PRIMARY KEY (`sbj_id`)
)
ENGINE = INNODB;


DROP TABLE IF EXISTS `Student_Setup_School_Specific_Category`;
CREATE TABLE `Student_Setup_School_Specific_Category` (
  `Sch_Spe_Id` INT(10) NOT NULL,
  `Cat_Id` VARCHAR(200) CHARACTER SET utf8   NOT NULL,
  `Sch_Id` INT(10) NOT NULL,
  PRIMARY KEY (`Sch_Spe_Id`)
)
ENGINE = INNODB;



DROP TABLE IF EXISTS `time_zones`;
CREATE TABLE `time_zones` (
  `time_zone_id` INT(10) NOT NULL AUTO_INCREMENT,
  `time_zones` VARCHAR(150) CHARACTER SET utf8   NOT NULL,
  PRIMARY KEY (`time_zone_id`)
)
ENGINE = INNODB;



DROP TABLE IF EXISTS `teacher`;
CREATE TABLE `teacher` (
  `tch_id` INT(10) NOT NULL,
  PRIMARY KEY (`tch_id`)
)
ENGINE = INNODB;



DROP TABLE IF EXISTS `Student_Setup_Category`;
CREATE TABLE `Student_Setup_Category` (
  `Cat_Id` INT(10) NOT NULL,
  `Cat_Name` LONGTEXT CHARACTER SET utf8   NULL,
  `Default_Cat` CHAR(1) CHARACTER SET utf8   NULL,
  PRIMARY KEY (`Cat_Id`)
)
ENGINE = INNODB;



DROP TABLE IF EXISTS `student_medical_info`;
CREATE TABLE `student_medical_info` (
  `stu_med_info_id` INT(10) NOT NULL,
  `pri_phy_first_nm` CHAR(50) CHARACTER SET utf8   NULL,
  `pri_phy_last_nm` CHAR(50) CHARACTER SET utf8   NULL,
  `pri_phy_phn` CHAR(20) CHARACTER SET utf8   NULL,
  `pri_phy_email` VARCHAR(50) CHARACTER SET utf8   NULL,
  `pfr_hsp_nm` CHAR(50) CHARACTER SET utf8   NULL,
  `prf_hsp_addr1` CHAR(50) CHARACTER SET utf8   NULL,
  `prf_hsp_addr2` CHAR(50) CHARACTER SET utf8   NULL,
  `prf_hsp_city` CHAR(30) CHARACTER SET utf8   NULL,
  `prf_hsp_st` CHAR(2) CHARACTER SET utf8   NULL,
  `prf_hsp_zip` CHAR(10) CHARACTER SET utf8   NULL,
  `prf_hsp_phn` CHAR(20) CHARACTER SET utf8   NULL,
  `last_updated` DATETIME NULL,
  PRIMARY KEY (`stu_med_info_id`)
)
ENGINE = INNODB;



DROP TABLE IF EXISTS `Student_Setup_Additional_Default_Contact_Field`;
CREATE TABLE `Student_Setup_Additional_Default_Contact_Field` (
  `Cont_Id` INT(10) NOT NULL,
  `Field_Name` LONGTEXT CHARACTER SET utf8   NOT NULL,
  `Field_Type` INT(10) NOT NULL,
  `Status` CHAR(1) CHARACTER SET utf8   NULL,
  PRIMARY KEY (`Cont_Id`)
)
ENGINE = INNODB;



DROP TABLE IF EXISTS `student`;
CREATE TABLE `student` (
  `stu_id` INT(10) NOT NULL,
  `sch_id` INT(10) NULL,
  PRIMARY KEY (`stu_id`)
)
ENGINE = INNODB;



DROP TABLE IF EXISTS `staff_type`;
CREATE TABLE `staff_type` (
  `stf_type_id` INT(10) NOT NULL,
  `stf_type_cd` VARCHAR(5) CHARACTER SET utf8   NOT NULL,
  `stf_type_short_nm` VARCHAR(25) CHARACTER SET utf8   NOT NULL,
  `stf_type_name` VARCHAR(50) CHARACTER SET utf8   NULL,
  `last_updated` DATETIME NULL,
  `Language_Type` VARCHAR(50) CHARACTER SET utf8   NULL,
  PRIMARY KEY (`stf_type_id`)
)
ENGINE = INNODB;


DROP TABLE IF EXISTS `schools`;
CREATE TABLE `schools` (
  `sch_id` INT(10) NOT NULL,
  `sch_short_nm` VARCHAR(20) CHARACTER SET utf8   NOT NULL,
  `sch_full_nm` VARCHAR(50) CHARACTER SET utf8   NOT NULL,
  `sch_addr1` LONGTEXT CHARACTER SET utf8   NULL,
  `sch_addr2` LONGTEXT CHARACTER SET utf8   NULL,
  `sch_city` VARCHAR(30) CHARACTER SET utf8   NOT NULL,
  `sch_zip` LONGTEXT CHARACTER SET utf8   NULL,
  `sch_fax` VARCHAR(20) CHARACTER SET utf8   NULL,
  `sch_phn` VARCHAR(20) CHARACTER SET utf8   NOT NULL,
  `sch_url` VARCHAR(100) CHARACTER SET utf8   NULL,
  `sch_ceeb_nbr` SMALLINT(5) NULL,
  `sch_type` VARCHAR(25) CHARACTER SET utf8   NOT NULL,
  `sch_ed_lvl` VARCHAR(25) CHARACTER SET utf8   NOT NULL,
  `sch_max_grade_id` INT(10) NULL,
  `sch_po_box_zip` LONGTEXT CHARACTER SET utf8   NULL,
  `sch_po_box_city` VARCHAR(30) CHARACTER SET utf8   NULL,
  `sch_po_box` LONGTEXT CHARACTER SET utf8   NULL,
  `sch_emer_phn` VARCHAR(20) CHARACTER SET utf8   NULL,
  `last_updated` DATETIME NULL,
  `sch_min_grade_id` INT(10) NULL,
  `sch_email` VARCHAR(50) CHARACTER SET utf8   NULL,
  `sch_principal` VARCHAR(50) CHARACTER SET utf8   NULL,
  `sch_base_grading_scale` VARCHAR(50) CHARACTER SET utf8   NULL,
  `sch_st` INT(10) NULL,
  `sch_po_box_st` INT(10) NULL,
  `sch_country` INT(10) NULL,
  `sch_po_box_addr1` LONGTEXT CHARACTER SET utf8   NULL,
  `sch_po_box_addr2` LONGTEXT CHARACTER SET utf8   NULL,
  `sch_po_box_country` INT(10) NULL,
  PRIMARY KEY (`sch_id`)
)
ENGINE = INNODB;




DROP TABLE IF EXISTS `phone_type`;
CREATE TABLE `phone_type` (
  `phn_type_id` INT(10) NOT NULL,
  `phn_type_cd` VARCHAR(5) CHARACTER SET utf8   NULL,
  `phn_type_nm` VARCHAR(25) CHARACTER SET utf8   NULL,
  `last_updated` DATETIME NULL,
  PRIMARY KEY (`phn_type_id`)
)
ENGINE = INNODB;


DROP TABLE IF EXISTS `person_relationship`;
CREATE TABLE `person_relationship` (
  `person_rel_id` INT(10) NOT NULL,
  `person_rel_type_cd` VARCHAR(5) CHARACTER SET utf8  NULL,
  `person_stu_rel_type_nm` VARCHAR(25) CHARACTER SET utf8   NOT NULL,
  `last_updated` DATETIME NULL,
  PRIMARY KEY (`person_rel_id`)
)
ENGINE = INNODB;












DROP TABLE IF EXISTS `school_cluster`;
CREATE TABLE `school_cluster` (
  `cluster_id` INT(10) NOT NULL,
  `cluster_short_nm` VARCHAR(10) CHARACTER SET utf8   NOT NULL,
  `cluster_nm` VARCHAR(50) CHARACTER SET utf8   NOT NULL,
  `cluster_atv_ind` CHAR(1) CHARACTER SET utf8   NOT NULL,
  `last_updated` DATETIME NULL,
  PRIMARY KEY (`cluster_id`)
)
ENGINE = INNODB;



DROP TABLE IF EXISTS `person_education_level`;
CREATE TABLE `person_education_level` (
  `person_ed_lvl_id` INT(10) NOT NULL,
  `person_ed_lvl_cd` VARCHAR(5) CHARACTER SET utf8   NOT NULL,
  `person_ed_lvl_nm` VARCHAR(25) CHARACTER SET utf8   NOT NULL,
  `last_updated` DATETIME NULL,
  PRIMARY KEY (`person_ed_lvl_id`)
)
ENGINE = INNODB;




DROP TABLE IF EXISTS `module`;
CREATE TABLE `module` (
  `mod_id` INT(10) NOT NULL,
  `mod_name` VARCHAR(30) CHARACTER SET utf8   NULL,
  PRIMARY KEY (`mod_id`)
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `Menu_Multilingual`;
CREATE TABLE `Menu_Multilingual` (
  `Menu_id` CHAR(10) CHARACTER SET utf8   NOT NULL,
  `Menu_Header` LONGTEXT CHARACTER SET utf8   NULL,
  `URL` LONGTEXT CHARACTER SET utf8   NULL,
  `Menu_Type` VARCHAR(50) CHARACTER SET utf8   NULL,
  `Language_Type` VARCHAR(50) CHARACTER SET utf8   NULL
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `medical_alert_actions`;
CREATE TABLE `medical_alert_actions` (
  `med_alert_act_id` INT(10) NOT NULL,
  `med_alert_act_nm` VARCHAR(30) CHARACTER SET utf8   NOT NULL,
  `med_alert_desc` VARCHAR(256) CHARACTER SET utf8   NULL,
  `med_alert_act_ext_desc` LONGTEXT NULL,
  `last_updated` DATETIME NULL,
  PRIMARY KEY (`med_alert_act_id`)
)
ENGINE = INNODB;






DROP TABLE IF EXISTS `Main_SubMenu_Child`;
CREATE TABLE `Main_SubMenu_Child` (
  `Main_SubMenu_Child_Id` INT(10) NOT NULL,
  `Main_SubMenu_ID` INT(10) NOT NULL,
  `Main_SubMenu_Child_Header` LONGTEXT CHARACTER SET utf8   NOT NULL,
  `Url` LONGTEXT CHARACTER SET utf8   NULL,
  `visible` CHAR(1) CHARACTER SET utf8   NULL
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `Main_SubMenu`;
CREATE TABLE `Main_SubMenu` (
  `Main_SubMenu_ID` INT(10) NOT NULL,
  `Main_menu_ID` INT(10) NOT NULL,
  `Main_SubMenu_Header` VARCHAR(100) CHARACTER SET utf8   NOT NULL,
  `Url` VARCHAR(255) CHARACTER SET utf8   NULL,
  `visible` CHAR(1) CHARACTER SET utf8   NULL
)
ENGINE = INNODB;



DROP TABLE IF EXISTS `Main_Menu`;
CREATE TABLE `Main_Menu` (
  `Main_Menu_ID` INT(10) NOT NULL,
  `Main_Menu_Header` VARCHAR(100) CHARACTER SET utf8   NULL,
  `Url` VARCHAR(255) CHARACTER SET utf8   NULL
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `look_up_data`;
CREATE TABLE `look_up_data` (
  `IID` INT(10) NOT NULL,
  `TYPE` INT(10) NOT NULL,
  `NAME` VARCHAR(100) CHARACTER SET utf8   NOT NULL,
  `ISO_CODE` VARCHAR(10) CHARACTER SET utf8   NULL,
  PRIMARY KEY (`IID`)
)
ENGINE = INNODB;



DROP TABLE IF EXISTS `language`;
CREATE TABLE `language` (
  `language_id` INT(10) NOT NULL,
  `language_cd` VARCHAR(5) CHARACTER SET utf8   NOT NULL,
  `language_nm` VARCHAR(25) CHARACTER SET utf8   NOT NULL,
  `last_updated` DATETIME NULL,
  PRIMARY KEY (`language_id`)
)
ENGINE = INNODB;



DROP TABLE IF EXISTS `installation`;
CREATE TABLE `installation` (
  `installation_id` INT(10) NOT NULL,
  `language_code` LONGTEXT CHARACTER SET utf8   NULL,
  `date_format_code` VARCHAR(50) CHARACTER SET utf8   NOT NULL,
  `database_type_code` LONGTEXT CHARACTER SET utf8   NULL,
  `server_name` LONGTEXT CHARACTER SET utf8   NOT NULL,
  `database_name` LONGTEXT CHARACTER SET utf8   NOT NULL,
  `database_username` LONGTEXT CHARACTER SET utf8   NOT NULL,
  `database_password` LONGTEXT CHARACTER SET utf8   NOT NULL,
  `port` VARCHAR(50) CHARACTER SET utf8   NOT NULL,
  `admin_username` LONGTEXT CHARACTER SET utf8   NOT NULL,
  `admin_password` LONGTEXT CHARACTER SET utf8   NOT NULL,
  `time_zone_code` VARCHAR(50) CHARACTER SET utf8   NULL,
  PRIMARY KEY (`installation_id`)
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `pages`;
CREATE TABLE `pages` (
  `pg_id` INT(10) NOT NULL,
  `pg_name` VARCHAR(30) CHARACTER SET utf8   NOT NULL,
  `pg_file` VARCHAR(50) CHARACTER SET utf8   NOT NULL,
  PRIMARY KEY (`pg_id`)
)
ENGINE = INNODB;



DROP TABLE IF EXISTS `Custom_Field_List_Item`;
CREATE TABLE `Custom_Field_List_Item` (
  `ListItem_Id` INT(10) NOT NULL,
  `control_id` INT(10) NOT NULL,
  `ListItem_name` VARCHAR(50) CHARACTER SET utf8   NULL,
  PRIMARY KEY (`ListItem_Id`)
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `access_roles`;
CREATE TABLE `access_roles` (
  `acc_role_id` INT(10) NOT NULL,
  `acc_role_cd` VARCHAR(5) CHARACTER SET utf8   NOT NULL,
  `acc_role_nm` VARCHAR(25) CHARACTER SET utf8   NOT NULL,
  `last_updated` DATETIME NULL,
  PRIMARY KEY (`acc_role_id`)
)
ENGINE = INNODB;



DROP TABLE IF EXISTS `fields_per_screen`;
CREATE TABLE `fields_per_screen` (
  `fld_id` INT(10) NOT NULL,
  `scr_id` INT(10) NOT NULL,
  `fld_name` VARCHAR(30) CHARACTER SET utf8   NOT NULL,
  `fld_tablesource` VARCHAR(30) CHARACTER SET utf8   NULL,
  `fld_fieldsource` VARCHAR(30) CHARACTER SET utf8   NULL,
  PRIMARY KEY (`fld_id`)
)
ENGINE = INNODB;



DROP TABLE IF EXISTS `events`;
CREATE TABLE `events` (
  `event_id` INT(10) NOT NULL AUTO_INCREMENT,
  `event_parent_id` INT(10) NULL,
  `Sch_ID` INT(10) NULL,
  `category_id` INT(10) NULL,
  `event_title` VARCHAR(100) CHARACTER SET utf8   NOT NULL,
  `event_desc` LONGTEXT NULL,
  `event_date` DATETIME NULL,
  `event_time` DATETIME NULL,
  `event_time_end` DATETIME NULL,
  `event_date_add` DATETIME NULL,
  `event_user_add` INT(10) NULL,
  `event_is_public` SMALLINT(5) NULL,
  `event_type` CHAR(2) CHARACTER SET utf8   NULL,
  PRIMARY KEY (`event_id`)
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `ethnicity`;
CREATE TABLE `ethnicity` (
  `eth_id` INT(10) NOT NULL,
  `eth_cd` VARCHAR(5) CHARACTER SET utf8   NOT NULL,
  `eth_nm` VARCHAR(25) CHARACTER SET utf8   NOT NULL,
  `last_updated` DATETIME NULL,
   `eth_flag` CHAR(1) CHARACTER SET utf8   NULL,
   `short_order` INT(10) NOT NULL,
    `sch_id` INT(10)  NULL,
  PRIMARY KEY (`eth_id`)
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `gender`;
CREATE TABLE `gender` (
  `gender_id` INT(10) NOT NULL,
  `gender_cd` VARCHAR(5) CHARACTER SET utf8   NOT NULL,
  `gender_nm` VARCHAR(25) CHARACTER SET utf8   NOT NULL,
  `last_updated` DATETIME NULL,
  PRIMARY KEY (`gender_id`)
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `function`;
CREATE TABLE `function` (
  `fun_id` INT(10) NOT NULL,
  `pg_id` INT(10) NULL,
  `fun_name` VARCHAR(30) CHARACTER SET utf8   NOT NULL,
  `prc_name` VARCHAR(30) CHARACTER SET utf8   NOT NULL,
  PRIMARY KEY (`fun_id`),
  CONSTRAINT `FK_function_pages` FOREIGN KEY `FK_function_pages` (`pg_id`)
    REFERENCES `pages` (`pg_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `grade_levels`;
CREATE TABLE `grade_levels` (
  `grd_lvl_id` INT(10) NOT NULL,
  `grd_lvl_cd` VARCHAR(5) CHARACTER SET utf8   NOT NULL,
  `grd_lvl_short_nm` VARCHAR(10) CHARACTER SET utf8   NOT NULL,
  `grd_lvl_nm` VARCHAR(30) CHARACTER SET utf8   NOT NULL,
  `grd_lvl_id_next` INT(10) NULL,
  `last_updated` DATETIME NULL,
  `grd_lvl_id_prev` INT(10) NULL,
  `sch_id` INT(10) NOT NULL DEFAULT 1,
  PRIMARY KEY (`grd_lvl_id`),
  CONSTRAINT `FK_grade_levels_schools` FOREIGN KEY `FK_grade_levels_schools` (`sch_id`)
    REFERENCES `schools` (`sch_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `Calender_Details`;
CREATE TABLE `Calender_Details` (
  `Caleder_Id` INT(10) NOT NULL,
  `Default_Tag` CHAR(1) CHARACTER SET utf8   NULL,
  `Calender_Name` LONGTEXT CHARACTER SET utf8   NOT NULL,
  `From_Date` DATETIME NULL,
  `To_Date` DATETIME NULL,
  `Sch_Id` INT(10) NOT NULL,
  `Last_Update_Date` LONGTEXT CHARACTER SET utf8   NULL,
  `Sort_Order` INT(10) NULL,
  PRIMARY KEY (`Caleder_Id`),
  CONSTRAINT `FK_Calender_Details_schools` FOREIGN KEY `FK_Calender_Details_schools` (`Sch_Id`)
    REFERENCES `schools` (`sch_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `modules_per_page`;
CREATE TABLE `modules_per_page` (
  `mod_id` INT(10) NOT NULL,
  `pg_id` INT(10) NOT NULL,
  PRIMARY KEY (`mod_id`, `pg_id`),
  CONSTRAINT `FK_modules_per_page_module` FOREIGN KEY `FK_modules_per_page_module` (`mod_id`)
    REFERENCES `module` (`mod_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK_modules_per_page_pages` FOREIGN KEY `FK_modules_per_page_pages` (`pg_id`)
    REFERENCES `pages` (`pg_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `person`;
CREATE TABLE `person` (
  `person_id` INT(10) NOT NULL,
  `person_last_nm` VARCHAR(50) CHARACTER SET utf8   NOT NULL,
  `person_first_nm` VARCHAR(50) CHARACTER SET utf8   NOT NULL,
  `person_middle_nm` VARCHAR(50) CHARACTER SET utf8   NULL,
  `gender_id` INT(10) NOT NULL,
  `language_id` INT(10) NOT NULL,
  `last_updated` DATETIME NULL,
  `eth_id` INT(10) NULL,
  `person_ed_lvl_id` INT(10) NULL,
  `person_dob` DATETIME NULL,
  `person_marital_sts` CHAR(1) CHARACTER SET utf8   NULL,
  `person_email` VARCHAR(50) CHARACTER SET utf8   NULL,
  PRIMARY KEY (`person_id`),
  CONSTRAINT `FK__person__eth_id__36B12243` FOREIGN KEY `FK__person__eth_id__36B12243` (`eth_id`)
    REFERENCES `ethnicity` (`eth_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK__person__gender_i__35BCFE0A` FOREIGN KEY `FK__person__gender_i__35BCFE0A` (`gender_id`)
    REFERENCES `gender` (`gender_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK__person__language__34C8D9D1` FOREIGN KEY `FK__person__language__34C8D9D1` (`language_id`)
    REFERENCES `language` (`language_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK_person_person_education_level` FOREIGN KEY `FK_person_person_education_level` (`person_ed_lvl_id`)
    REFERENCES `person_education_level` (`person_ed_lvl_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;



DROP TABLE IF EXISTS `Student_Setup_Additional_Contact_Status`;
CREATE TABLE `Student_Setup_Additional_Contact_Status` (
  `Status_Id` INT(10) NOT NULL,
  `Cont_Id` INT(10) NULL,
  `Status` CHAR(1) CHARACTER SET utf8   NOT NULL,
  `Sch_Id` INT(10) NOT NULL,
  `Emergency` CHAR(1) CHARACTER SET utf8   NULL,
  `Field_View` CHAR(10) CHARACTER SET utf8   NOT NULL DEFAULT 'N',
  PRIMARY KEY (`Status_Id`),
  CONSTRAINT `FK_Student_Setup_Additional_Contact_Status_schools` FOREIGN KEY `FK_Student_Setup_Additional_Contact_Status_schools` (`Sch_Id`)
    REFERENCES `schools` (`sch_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `Student_Setup_Additional_Contact_List`;
CREATE TABLE `Student_Setup_Additional_Contact_List` (
  `Cont_List_Id` INT(10) NOT NULL,
  `Cont_Id_List` LONGTEXT CHARACTER SET utf8   NOT NULL,
  `Def_Field_Id` INT(10) NOT NULL,
  `Sch_Id` INT(10) NOT NULL,
  `Emergency` CHAR(1) CHARACTER SET utf8   NULL,
  PRIMARY KEY (`Cont_List_Id`),
  CONSTRAINT `FK_Student_Setup_Additional_Contact_List_schools` FOREIGN KEY `FK_Student_Setup_Additional_Contact_List_schools` (`Sch_Id`)
    REFERENCES `schools` (`sch_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `student_school`;
CREATE TABLE `student_school` (
  `std_id` INT(10) NOT NULL,
  `sch_id` INT(10) NULL,
  PRIMARY KEY (`std_id`),
  CONSTRAINT `FK_studebnt_school_schools` FOREIGN KEY `FK_studebnt_school_schools` (`sch_id`)
    REFERENCES `schools` (`sch_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `student_phone`;
CREATE TABLE `student_phone` (
  `stu_phn_id` INT(10) NOT NULL,
  `stu_id` INT(10) NOT NULL,
  `stu_phn_cur_ind` CHAR(1) CHARACTER SET utf8   NULL,
  `stu_phn_cntry_cd` CHAR(5) CHARACTER SET utf8   NULL,
  `stu_phn_area_cd` CHAR(5) CHARACTER SET utf8   NOT NULL,
  `stu_phn_nbr` CHAR(10) CHARACTER SET utf8   NOT NULL,
  `phn_type_id` INT(10) NOT NULL,
  `last_updated` DATETIME NULL,
  PRIMARY KEY (`stu_phn_id`),
  CONSTRAINT `FK__student_p__phn_t__571DF1D5` FOREIGN KEY `FK__student_p__phn_t__571DF1D5` (`phn_type_id`)
    REFERENCES `phone_type` (`phn_type_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK__student_p__stu_i__5812160E` FOREIGN KEY `FK__student_p__stu_i__5812160E` (`stu_id`)
    REFERENCES `student` (`stu_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;

/*abhishek*/
DROP TABLE IF EXISTS `staff`;
CREATE TABLE `staff` (
  `stf_id` INT(10) NOT NULL,
  `language_id` INT(10) NOT NULL,
  `gender_id` INT(10) NOT NULL,
  `eth_id` INT(10) NULL,
  `stf_first_nm` LONGTEXT CHARACTER SET utf8 NOT NULL,
  `stf_middle_nm` LONGTEXT CHARACTER SET utf8 NULL,
  `stf_last_nm` LONGTEXT CHARACTER SET utf8 NOT NULL,
  `stf_dob` DATETIME NOT NULL,
  `last_updated` DATETIME NULL,
  `stf_staff_id` LONGTEXT CHARACTER SET utf8 NULL,
  `stf_alternate_id` LONGTEXT CHARACTER SET utf8 NULL,
  `stf_salutation` VARCHAR(50) CHARACTER SET utf8 NULL,
  `stf_suffix` VARCHAR(50) CHARACTER SET utf8 NULL,
  `stf_secondry_lang_id` INT(10) NULL,
  `stf_third_lang_id` INT(10) NULL,
  `stf_disability` CHAR(1) CHARACTER SET utf8 NULL,
  `stf_disability_desc` LONGTEXT CHARACTER SET utf8 NULL,
  PRIMARY KEY (`stf_id`),
  CONSTRAINT `FK_staff_language` FOREIGN KEY `FK_staff_language` (`language_id`)
    REFERENCES `language` (`language_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK_staff_ethnicity` FOREIGN KEY `FK_staff_ethnicity` (`eth_id`)
    REFERENCES `ethnicity` (`eth_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK_staff_gender` FOREIGN KEY `FK_staff_gender` (`gender_id`)
    REFERENCES `gender` (`gender_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `schools_period`;
CREATE TABLE `schools_period` (
  `sch_period_id` INT(10) NOT NULL,
  `sch_id` INT(10) NOT NULL,
  `title` LONGTEXT CHARACTER SET utf8   NOT NULL,
  `short_name` LONGTEXT CHARACTER SET utf8   NULL,
  `short_order` INT(10) NULL,
  `length` INT(10) NULL,
  `block` LONGTEXT CHARACTER SET utf8   NULL,
  `use_atted` CHAR(10) CHARACTER SET utf8   NULL,
  `start_time` VARCHAR(50) CHARACTER SET utf8   NULL,
  `end_time` VARCHAR(50) CHARACTER SET utf8   NULL,
  PRIMARY KEY (`sch_period_id`),
  CONSTRAINT `FK_schools_period_schools` FOREIGN KEY `FK_schools_period_schools` (`sch_id`)
    REFERENCES `schools` (`sch_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `student_address`;
CREATE TABLE `student_address` (
  `stu_addr_id` INT(10) NOT NULL,
  `stu_id` INT(10) NOT NULL,
  `stu_addr_cur_ind` CHAR(1) CHARACTER SET utf8   NOT NULL,
  `stu_addr1_pri` VARCHAR(50) CHARACTER SET utf8   NOT NULL,
  `stu_addr2_pri` VARCHAR(50) CHARACTER SET utf8   NULL,
  `stu_city_pri` VARCHAR(30) CHARACTER SET utf8   NOT NULL,
  `stu_st_pri` CHAR(2) CHARACTER SET utf8   NOT NULL,
  `stu_zip_pri` CHAR(10) CHARACTER SET utf8   NOT NULL,
  `stu_addr_mail` VARCHAR(50) CHARACTER SET utf8   NOT NULL,
  `stu_addr2_mail` VARCHAR(50) CHARACTER SET utf8   NULL,
  `stu_city_mail` VARCHAR(30) CHARACTER SET utf8   NOT NULL,
  `stu_st_mail` CHAR(2) CHARACTER SET utf8   NOT NULL,
  `stu_zip_mail` CHAR(10) CHARACTER SET utf8   NOT NULL,
  `last_updated` DATETIME NULL,
  PRIMARY KEY (`stu_addr_id`),
  CONSTRAINT `FK__student_a__stu_i__4F7CD00D` FOREIGN KEY `FK__student_a__stu_i__4F7CD00D` (`stu_id`)
    REFERENCES `student` (`stu_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `Student_Additional_Contact`;
CREATE TABLE `Student_Additional_Contact` (
   
  `Std_Add_Cont_Id` INT(10) NOT NULL,
  `Cat_Id` INT(10) NULL,
  `Std_Id` INT(10) NULL,
  `Cont_Id` INT(10) NULL,
  `Value` LONGTEXT CHARACTER SET utf8   NULL,
  `Contact_Set` LONGTEXT CHARACTER SET utf8   NULL,
  `sch_Id` INT(10) NULL,
  `Cont_set_Id` INT(10) NULL,
  
  
  PRIMARY KEY (`Std_Add_Cont_Id`),
   CONSTRAINT `FK_Student_Additional_Contact_student_school` FOREIGN KEY `FK_Student_Additional_Contact_student_school` (`Std_Id`)
    REFERENCES `student_school` (`std_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `student_access`;
CREATE TABLE `student_access` (
  `stu_id` INT(10) NOT NULL,
  `acc_role_id` INT(10) NULL,
  `stu_user_nm` VARCHAR(18) CHARACTER SET utf8   NOT NULL,
  `stu_pwd` CHAR(20) CHARACTER SET utf8   NOT NULL,
  `stu_acc_atv_ind` CHAR(1) CHARACTER SET utf8   NOT NULL,
  `last_updated` DATETIME NULL,
  PRIMARY KEY (`stu_id`),
  CONSTRAINT `FK__student_a__stu_i__4E88ABD4` FOREIGN KEY `FK__student_a__stu_i__4E88ABD4` (`stu_id`)
    REFERENCES `student` (`stu_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK_student_access_access_roles` FOREIGN KEY `FK_student_access_access_roles` (`acc_role_id`)
    REFERENCES `access_roles` (`acc_role_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `Portal_Notes`;
CREATE TABLE `Portal_Notes` (
  `portal_note_id` INT(10) NOT NULL,
  `sch_id` INT(10) NOT NULL,
  `title` LONGTEXT CHARACTER SET utf8   NOT NULL,
  `note` LONGTEXT CHARACTER SET utf8   NOT NULL,
  `short_order` INT(10) NULL,
  `visible_start_date` DATETIME NOT NULL,
  `visible_end_date` DATETIME NOT NULL,
  `visible_staff_id` LONGTEXT CHARACTER SET utf8   NOT NULL,
  PRIMARY KEY (`portal_note_id`),
  CONSTRAINT `FK_Portal_Notes_schools` FOREIGN KEY `FK_Portal_Notes_schools` (`sch_id`)
    REFERENCES `schools` (`sch_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `Student_Setup_Address_Default_Field_Status`;
CREATE TABLE `Student_Setup_Address_Default_Field_Status` (
  `Status_Id` INT(10) NOT NULL,
  `Add_Id` INT(10) NOT NULL,
  `Status` CHAR(1) CHARACTER SET utf8   NOT NULL,
  `Sch_Id` INT(10) NOT NULL,
  `Field_View` CHAR(10) CHARACTER SET utf8   NOT NULL DEFAULT 'N',
  PRIMARY KEY (`Status_Id`),
  CONSTRAINT `FK_Student_Setup_Address_Default_Field_Status_schools` FOREIGN KEY `FK_Student_Setup_Address_Default_Field_Status_schools` (`Sch_Id`)
    REFERENCES `schools` (`sch_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `student_medical_alert`;
CREATE TABLE `student_medical_alert` (
  `stu_med_alert_id` INT(10) NOT NULL,
  `stu_id` INT(10) NOT NULL,
  `med_alert_act_id` INT(10) NOT NULL,
  `stu_med_alert_nm` VARCHAR(25) CHARACTER SET utf8   NULL,
  `life_threat_ind` CHAR(1) CHARACTER SET utf8   NULL,
  `last_updated` DATETIME NULL,
  PRIMARY KEY (`stu_med_alert_id`),
  CONSTRAINT `FK_student_medical_alert_medical_alert_actions` FOREIGN KEY `FK_student_medical_alert_medical_alert_actions` (`med_alert_act_id`)
    REFERENCES `medical_alert_actions` (`med_alert_act_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK_student_medical_alert_student` FOREIGN KEY `FK_student_medical_alert_student` (`stu_id`)
    REFERENCES `student` (`stu_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `student_join_sibling`;
CREATE TABLE `student_join_sibling` (
  `stu_join_sib_id` INT(10) NOT NULL,
  `stu_id` INT(10) NULL,
  `stu_sib_stu_id` INT(10) NULL,
  `last_updated` DATETIME NULL,
  PRIMARY KEY (`stu_join_sib_id`),
  CONSTRAINT `FK_student_join_sibling_student` FOREIGN KEY `FK_student_join_sibling_student` (`stu_id`)
    REFERENCES `student` (`stu_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `tch_phone`;
CREATE TABLE `tch_phone` (
  `tch_id` INT(10) NOT NULL,
  PRIMARY KEY (`tch_id`),
  CONSTRAINT `FK__tch_phone__tch_i__1E6F845E` FOREIGN KEY `FK__tch_phone__tch_i__1E6F845E` (`tch_id`)
    REFERENCES `teacher` (`tch_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK__tch_phone__tch_i__1F63A897` FOREIGN KEY `FK__tch_phone__tch_i__1F63A897` (`tch_id`)
    REFERENCES `teacher` (`tch_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK__tch_phone__tch_i__2057CCD0` FOREIGN KEY `FK__tch_phone__tch_i__2057CCD0` (`tch_id`)
    REFERENCES `teacher` (`tch_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `tch_join_sch`;
CREATE TABLE `tch_join_sch` (
  `sch_id` INT(10) NOT NULL,
  `tch_id` INT(10) NOT NULL,
  PRIMARY KEY (`sch_id`, `tch_id`),
  CONSTRAINT `FK__tch_join___sch_i__5EBF139D` FOREIGN KEY `FK__tch_join___sch_i__5EBF139D` (`sch_id`)
    REFERENCES `schools` (`sch_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK__tch_join___tch_i__1B9317B3` FOREIGN KEY `FK__tch_join___tch_i__1B9317B3` (`tch_id`)
    REFERENCES `teacher` (`tch_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK__tch_join___tch_i__1C873BEC` FOREIGN KEY `FK__tch_join___tch_i__1C873BEC` (`tch_id`)
    REFERENCES `teacher` (`tch_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK__tch_join___tch_i__1D7B6025` FOREIGN KEY `FK__tch_join___tch_i__1D7B6025` (`tch_id`)
    REFERENCES `teacher` (`tch_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `tch_join_sbj`;
CREATE TABLE `tch_join_sbj` (
  `tch_id` INT(10) NOT NULL,
  `sbj_id` INT(10) NOT NULL,
  PRIMARY KEY (`tch_id`, `sbj_id`),
  CONSTRAINT `FK__tch_join___sbj_i__14E61A24` FOREIGN KEY `FK__tch_join___sbj_i__14E61A24` (`sbj_id`)
    REFERENCES `subject` (`sbj_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK__tch_join___sbj_i__15DA3E5D` FOREIGN KEY `FK__tch_join___sbj_i__15DA3E5D` (`sbj_id`)
    REFERENCES `subject` (`sbj_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK__tch_join___sbj_i__16CE6296` FOREIGN KEY `FK__tch_join___sbj_i__16CE6296` (`sbj_id`)
    REFERENCES `subject` (`sbj_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK__tch_join___tch_i__17C286CF` FOREIGN KEY `FK__tch_join___tch_i__17C286CF` (`tch_id`)
    REFERENCES `teacher` (`tch_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK__tch_join___tch_i__18B6AB08` FOREIGN KEY `FK__tch_join___tch_i__18B6AB08` (`tch_id`)
    REFERENCES `teacher` (`tch_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK__tch_join___tch_i__19AACF41` FOREIGN KEY `FK__tch_join___tch_i__19AACF41` (`tch_id`)
    REFERENCES `teacher` (`tch_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `tch_address`;
CREATE TABLE `tch_address` (
  `tch_id` INT(10) NOT NULL,
  PRIMARY KEY (`tch_id`),
  CONSTRAINT `FK__tch_addre__tch_i__1209AD79` FOREIGN KEY `FK__tch_addre__tch_i__1209AD79` (`tch_id`)
    REFERENCES `teacher` (`tch_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK__tch_addre__tch_i__12FDD1B2` FOREIGN KEY `FK__tch_addre__tch_i__12FDD1B2` (`tch_id`)
    REFERENCES `teacher` (`tch_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK__tch_addre__tch_i__13F1F5EB` FOREIGN KEY `FK__tch_addre__tch_i__13F1F5EB` (`tch_id`)
    REFERENCES `teacher` (`tch_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `Student_Setup_FormLayout_Order`;
CREATE TABLE `Student_Setup_FormLayout_Order` (
  `Sort_Order_Id` INT(10) NOT NULL AUTO_INCREMENT,
  `Field_Id` INT(10) NOT NULL,
  `Sch_Id` INT(10) NOT NULL,
  `FL_FieldType` CHAR(2) CHARACTER SET utf8   NOT NULL,
  `Sort_Order` INT(10) NOT NULL,
  `Cat_Id` INT(10) NOT NULL,
  PRIMARY KEY (`Sort_Order_Id`),
  CONSTRAINT `FK_Student_FormLayout_Order_schools` FOREIGN KEY `FK_Student_FormLayout_Order_schools` (`Sch_Id`)
    REFERENCES `schools` (`sch_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `Student_Setup_Default_Field_Status`;
CREATE TABLE `Student_Setup_Default_Field_Status` (
  `Status_Id` INT(10) NOT NULL,
  `Default_Field_Id` INT(10) NOT NULL,
  `Status` CHAR(1) CHARACTER SET utf8   NOT NULL,
  `School_Id` INT(10) NOT NULL,
  `Field_View` CHAR(10) CHARACTER SET utf8   NOT NULL DEFAULT 'N',
  PRIMARY KEY (`Status_Id`),
  CONSTRAINT `FK_Student_Setup_Default_Field_Status_schools` FOREIGN KEY `FK_Student_Setup_Default_Field_Status_schools` (`School_Id`)
    REFERENCES `schools` (`sch_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `Student_Setup_Default_Field`;
CREATE TABLE `Student_Setup_Default_Field` (
  `Def_Field_Id` INT(10) NOT NULL,
  `field_name` LONGTEXT CHARACTER SET utf8   NULL,
  `Cat_Id` INT(10) NOT NULL,
  `Field_Type` INT(10) NOT NULL,
  `Status` CHAR(1) CHARACTER SET utf8   NULL,
  `DefaultField` CHAR(1) CHARACTER SET utf8   NOT NULL DEFAULT 'D',
  PRIMARY KEY (`Def_Field_Id`),
  CONSTRAINT `FK_Student_Setup_Default_Field_Student_Setup_Category` FOREIGN KEY `FK_Student_Setup_Default_Field_Student_Setup_Category` (`Cat_Id`)
    REFERENCES `Student_Setup_Category` (`Cat_Id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `student_fields_order`;
CREATE TABLE `student_fields_order` (
  `Sort_Order` INT(10) NOT NULL,
  `Field_Name` LONGTEXT CHARACTER SET utf8   NULL,
  `student_id` INT(10) NULL,
  `extrafield_id` INT(10) NULL,
  `value` LONGTEXT CHARACTER SET utf8   NULL,
  `sch_id` INT(10) NULL,
  `cat_id` INT(10) NOT NULL DEFAULT '1'
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `year_type`;
CREATE TABLE `year_type` (
  `years_type_id` INT(10) NOT NULL,
  `year_type_cd` VARCHAR(5) CHARACTER SET utf8   NULL,
  `year_type_nm` VARCHAR(25) CHARACTER SET utf8   NULL,
  `last_updated` DATETIME NOT NULL,
  PRIMARY KEY (`years_type_id`)
)
ENGINE = INNODB;




DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `usr_id` INT(10) NOT NULL,
  `acc_role_id` INT(10) NOT NULL,
  `usr_name` VARCHAR(8) CHARACTER SET utf8   NOT NULL,
  `admin_flag` TINYINT NULL,
  `active_flag` TINYINT NULL,
  `years_type_id` INT(10) NOT NULL,
  `year_type_cd` VARCHAR(5) CHARACTER SET utf8   NULL,
  `year_type_nm` VARCHAR(25) CHARACTER SET utf8   NULL,
  `last_updated` DATETIME NULL,
  PRIMARY KEY (`usr_id`),
  CONSTRAINT `FK_user_access_roles` FOREIGN KEY `FK_user_access_roles` (`acc_role_id`)
    REFERENCES `access_roles` (`acc_role_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK_user_year_type` FOREIGN KEY `FK_user_year_type` (`years_type_id`)
    REFERENCES `year_type` (`years_type_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;


DROP TABLE IF EXISTS `student_details`;
CREATE TABLE `student_details` (
  `std_details_id` INT(10) NOT NULL,
  `std_id` INT(10) NULL,
  `field_category` VARCHAR(50) CHARACTER SET utf8   NULL,
  `field_id` INT(10) NULL,
  `value` VARCHAR(50) CHARACTER SET utf8   NULL,
  `cat_id` INT(10) NULL,
  PRIMARY KEY (`std_details_id`),
  CONSTRAINT `FK_student_details_student_school` FOREIGN KEY `FK_student_details_student_school` (`std_id`)
    REFERENCES `student_school` (`std_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;


DROP TABLE IF EXISTS `Student_Setup_Address_Field`;
CREATE TABLE `Student_Setup_Address_Field` (
  `Add_Id` INT(10) NOT NULL,
  `Field_Name` LONGTEXT CHARACTER SET utf8   NOT NULL,
  `Def_Field_Id` INT(10) NOT NULL,
  `Field_Type` INT(10) NOT NULL,
  `Status` CHAR(1) CHARACTER SET utf8   NOT NULL,
  `Emergency` CHAR(1) CHARACTER SET utf8   NULL,
  PRIMARY KEY (`Add_Id`),
  CONSTRAINT `FK_Student_Setup_Address_Field_Student_Setup_Default_Field` FOREIGN KEY `FK_Student_Setup_Address_Field_Student_Setup_Default_Field` (`Def_Field_Id`)
    REFERENCES `Student_Setup_Default_Field` (`Def_Field_Id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;


DROP TABLE IF EXISTS `student_join_person`;
CREATE TABLE `student_join_person` (
  `stu_id` INT(10) NOT NULL,
  `person_id` INT(10) NOT NULL,
  `person_rel_id` INT(10) NOT NULL,
  `legal_guardian_ind` CHAR(1) CHARACTER SET utf8   NOT NULL,
  `receives_mail_ind` CHAR(1) CHARACTER SET utf8   NOT NULL,
  `parent_portal_ind` CHAR(1) CHARACTER SET utf8   NOT NULL,
  `stu_pickup_ind` CHAR(1) CHARACTER SET utf8   NOT NULL,
  `last_updated` DATETIME NULL,
  PRIMARY KEY (`stu_id`, `person_id`),
  CONSTRAINT `FK_student_join_person_person_relationship` FOREIGN KEY `FK_student_join_person_person_relationship` (`person_rel_id`)
    REFERENCES `person_relationship` (`person_rel_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK__student_j__perso__5629CD9C` FOREIGN KEY `FK__student_j__perso__5629CD9C` (`person_id`)
    REFERENCES `person` (`person_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK__student_j__stu_i__5535A963` FOREIGN KEY `FK__student_j__stu_i__5535A963` (`stu_id`)
    REFERENCES `student` (`stu_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;
/*abhishek*/
DROP TABLE IF EXISTS `staff_phone`;
CREATE TABLE `staff_phone` (
  `stf_phn_id` INT(10) NOT NULL,
  `stf_id` INT(10) NOT NULL,
  `last_updated` DATETIME NULL,
  `stf_home_phn` VARCHAR(50) CHARACTER SET utf8 NULL,
  `stf_mobile_phn` VARCHAR(50) CHARACTER SET utf8 NULL,
  `stf_offc_phn` VARCHAR(50)  CHARACTER SET utf8 NULL,
  `stf_wrk_email` VARCHAR(50) CHARACTER SET utf8 NULL,
  `stf_personal_email` VARCHAR(50) CHARACTER SET utf8 NULL,
  PRIMARY KEY (`stf_phn_id`),
  CONSTRAINT `FK_staff_phone_staff` FOREIGN KEY `FK_staff_phone_staff` (`stf_id`)
    REFERENCES `staff` (`stf_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `Student_Setup_Custom_Field`;
CREATE TABLE `Student_Setup_Custom_Field` (
  `extrafield_id` INT(10) NOT NULL,
  `field_name` VARCHAR(50) CHARACTER SET utf8   NULL,
  `field_type_id` INT(10) NULL,
  `sch_id` INT(10) NULL,
  `st_id` INT(10) NULL,
  `staff_type_id` INT(10) NULL,
  `value` LONGTEXT CHARACTER SET utf8   NULL,
  `Category_Id` INT(10) NOT NULL DEFAULT '1',
  `Status` CHAR(1) CHARACTER SET utf8   NOT NULL DEFAULT 'A',
  `CustomField` CHAR(1) CHARACTER SET utf8   NOT NULL DEFAULT 'C',
  `Field_View` CHAR(10) CHARACTER SET utf8   NOT NULL DEFAULT 'N',
  PRIMARY KEY (`extrafield_id`)
)
ENGINE = INNODB;


DROP TABLE IF EXISTS `staff_join_school`;
CREATE TABLE `staff_join_school` (
  `stf_join_schl_id` INT(10) NOT NULL,
  `sch_id` INT(10) NOT NULL,
  `stf_id` INT(10) NOT NULL,
  `stf_hire_dt` DATETIME NULL,
  `stf_term_dt` DATETIME NULL,
  `last_updated` DATETIME NULL,
  `stf_job_title` LONGTEXT CHARACTER SET utf8 NULL,
  `stf_type_id` INT(10) NULL,
  PRIMARY KEY (`stf_join_schl_id`),
  CONSTRAINT `FK_staff_join_school_schools` FOREIGN KEY `FK_staff_join_school_schools` (`sch_id`)
    REFERENCES `schools` (`sch_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK_staff_join_school_staff` FOREIGN KEY `FK_staff_join_school_staff` (`stf_id`)
    REFERENCES `staff` (`stf_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK_staff_join_school_staff_type` FOREIGN KEY `FK_staff_join_school_staff_type` (`stf_type_id`)
    REFERENCES `staff_type` (`stf_type_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `staff_certification`;
CREATE TABLE `staff_certification` (
  `stf_cert_id` INT(10) NOT NULL,
  `stf_id` INT(10) NOT NULL,
  `stf_cert_dt` DATETIME NULL,
  `stf_cert_exp_dt` DATETIME NULL,
  `stf_cert_cd` LONGTEXT CHARACTER SET utf8 NULL,
  `stf_cert_short_nm` LONGTEXT CHARACTER SET utf8 NULL,
  `stf_cert_nm` LONGTEXT CHARACTER SET utf8 NULL,
  `stf_pri_cert_ind` CHAR(1) NULL,
  `last_updated` DATETIME NULL,
  `stf_cert_desc` LONGTEXT CHARACTER SET utf8 NULL,
  PRIMARY KEY (`stf_cert_id`),
  CONSTRAINT `FK_staff_certification_staff` FOREIGN KEY `FK_staff_certification_staff` (`stf_id`)
    REFERENCES `staff` (`stf_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;


DROP TABLE IF EXISTS `staff_address`;
CREATE TABLE `staff_address` (
  `stf_addr_id` INT(10) NOT NULL,
  `stf_id` INT(10) NOT NULL,
  `stf_addr1_pri` LONGTEXT CHARACTER SET utf8 NOT NULL,
  `stf_addr2_pri` LONGTEXT CHARACTER SET utf8 NULL,
  `stf_city_pri` LONGTEXT CHARACTER SET utf8 NOT NULL,
  `stf_st_pri` LONGTEXT CHARACTER SET utf8 NOT NULL,
  `stf_zip_pri` CHAR(10) NOT NULL,
  `stf_addr1_mail` LONGTEXT CHARACTER SET utf8 NOT NULL,
  `stf_addr2_mail` LONGTEXT CHARACTER SET utf8 NULL,
  `stf_city_mail` LONGTEXT CHARACTER SET utf8 NOT NULL,
  `stf_st_mail` LONGTEXT CHARACTER SET utf8 NOT NULL,
  `stf_zip_mail` CHAR(10) NOT NULL,
  `last_updated` DATETIME NULL,
  `stf_pobox_mail` LONGTEXT CHARACTER SET utf8 NULL,
  PRIMARY KEY (`stf_addr_id`),
  CONSTRAINT `FK_staff_address_staff` FOREIGN KEY `FK_staff_address_staff` (`stf_id`)
    REFERENCES `staff` (`stf_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `staff_access`;
CREATE TABLE `staff_access` (
  `stf_id` INT(10) NOT NULL,
  `acc_role_id` INT(10) NULL,
  `stf_user_nm` LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `stf_pwd` CHAR(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `last_updated` DATETIME NULL,
  `stf_secret_ques` LONGTEXT CHARACTER SET utf8 NULL,
  `stf_secret_ans` LONGTEXT CHARACTER SET utf8 NULL,
  `stf_opensis_access` CHAR(2) CHARACTER SET utf8 NULL,
  `school_access` LONGTEXT CHARACTER SET utf8 NULL,
  PRIMARY KEY (`stf_id`),
  CONSTRAINT `FK_staff_access_staff` FOREIGN KEY `FK_staff_access_staff` (`stf_id`)
    REFERENCES `staff` (`stf_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;


DROP TABLE IF EXISTS `staff_library_access`;
CREATE TABLE `staff_library_access` (
  `stf_lib_acces_id` INT(10) NOT NULL,
  `stf_id` INT(10) NOT NULL,
  `stf_lib_card_no` LONGTEXT CHARACTER SET utf8 NULL,
  `stf_lib_class` VARCHAR(50) CHARACTER SET utf8 NULL,
  `stf_status` VARCHAR(50) CHARACTER SET utf8 NULL,
  `stf_lib_access` CHAR(10) CHARACTER SET utf8 NULL,
  PRIMARY KEY (`stf_lib_acces_id`),
  CONSTRAINT `FK_staff_library_access_staff` FOREIGN KEY `FK_staff_library_access_staff` (`stf_id`)
    REFERENCES `staff` (`stf_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `staff_emergency_contact`;
CREATE TABLE `staff_emergency_contact` (
  `stf_emrgn_cont_id` INT(10) NOT NULL,
  `stf_id` INT(10) NOT NULL,
  `stf_emrgn_first_name` LONGTEXT CHARACTER SET utf8 NULL,
  `stf_emrgn_last_name` LONGTEXT CHARACTER SET utf8 NULL,
  `stf_emrgn_relationship` LONGTEXT CHARACTER SET utf8 NULL,
  `stf_emrgn_home_phn` LONGTEXT CHARACTER SET utf8 NULL,
  `stf_emrgn_mobile_phn` LONGTEXT CHARACTER SET utf8 NULL,
  `stf_emrgn_offc_phn` LONGTEXT CHARACTER SET utf8 NULL,
  `stf_emrgn_email` LONGTEXT CHARACTER SET utf8 NULL,
  PRIMARY KEY (`stf_emrgn_cont_id`),
  CONSTRAINT `FK_staff_emergency_contact_staff` FOREIGN KEY `FK_staff_emergency_contact_staff` (`stf_id`)
    REFERENCES `staff` (`stf_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;




DROP TABLE IF EXISTS `staff_picture`;

CREATE TABLE `staff_picture`(
	`stf_pic_id` INT(10) NOT NULL,
	`stf_id` INT(10) NOT NULL,
	`sch_id` INT(10) NOT NULL,
	`name` LONGTEXT CHARACTER SET utf8 NOT NULL,
	
	PRIMARY KEY (`stf_pic_id`),
	
CONSTRAINT `FK_staff_picture_schools` FOREIGN KEY `FK_staff_picture_schools` (`sch_id`)
    REFERENCES `schools` (`sch_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK_staff_picture_staff` FOREIGN KEY `FK_staff_picture_staff` (`stf_id`)
    REFERENCES `staff` (`stf_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
    )
ENGINE = INNODB;




DROP TABLE IF EXISTS `person_phone`;
CREATE TABLE `person_phone` (
  `person_phn_id` INT(10) NOT NULL,
  `person_id` INT(10) NOT NULL,
  `phn_type_id` INT(10) NOT NULL,
  `person_phn_cur_ind` CHAR(1) CHARACTER SET utf8   NULL,
  `person_phn_cntry_cd` CHAR(5) CHARACTER SET utf8   NULL,
  `person_phn_area_cd` CHAR(5) CHARACTER SET utf8   NOT NULL,
  `person_phn_nbr` CHAR(10) CHARACTER SET utf8   NOT NULL,
  `last_updated` DATETIME NULL,
  PRIMARY KEY (`person_phn_id`),
  CONSTRAINT `FK_person_phone_person` FOREIGN KEY `FK_person_phone_person` (`person_id`)
    REFERENCES `person` (`person_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK_person_phone_phone_type` FOREIGN KEY `FK_person_phone_phone_type` (`phn_type_id`)
    REFERENCES `phone_type` (`phn_type_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;



DROP TABLE IF EXISTS `person_address`;
CREATE TABLE `person_address` (
  `person_address_id` INT(10) NOT NULL,
  `person_id` INT(10) NOT NULL,
  `person_addr_cur_ind` CHAR(1) CHARACTER SET utf8   NULL,
  `person_addr1_pri` VARCHAR(50) CHARACTER SET utf8   NOT NULL,
  `person_addr2_pri` VARCHAR(50) CHARACTER SET utf8   NULL,
  `person_city_pri` VARCHAR(30) CHARACTER SET utf8   NOT NULL,
  `person_st_pri` CHAR(2) CHARACTER SET utf8   NOT NULL,
  `person_zip_pri` CHAR(10) CHARACTER SET utf8   NOT NULL,
  `person_addr1_mail` VARCHAR(50) CHARACTER SET utf8   NOT NULL,
  `person_addr2_mail` VARCHAR(50) CHARACTER SET utf8   NULL,
  `person_city_mail` VARCHAR(30) CHARACTER SET utf8   NOT NULL,
  `person_st_mail` CHAR(2) CHARACTER SET utf8   NOT NULL,
  `person_zip_mail` CHAR(10) CHARACTER SET utf8   NOT NULL,
  `last_updated` DATETIME NULL,
  PRIMARY KEY (`person_address_id`),
  CONSTRAINT `FK_person_address_person` FOREIGN KEY `FK_person_address_person` (`person_id`)
    REFERENCES `person` (`person_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `person_accesss`;
CREATE TABLE `person_accesss` (
  `person_id` INT(10) NOT NULL,
  `acc_role_id` INT(10) NULL,
  `person_user_nm` VARCHAR(18) CHARACTER SET utf8   NOT NULL,
  `person_pwd` CHAR(20) CHARACTER SET utf8   NOT NULL,
  `person_acc_atv_ind` CHAR(1) CHARACTER SET utf8   NOT NULL,
  `last_updated` DATETIME NULL,
  PRIMARY KEY (`person_id`),
  CONSTRAINT `FK__person_ac__perso__37A5467C` FOREIGN KEY `FK__person_ac__perso__37A5467C` (`person_id`)
    REFERENCES `person` (`person_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK_person_accesss_access_roles` FOREIGN KEY `FK_person_accesss_access_roles` (`acc_role_id`)
    REFERENCES `access_roles` (`acc_role_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `log`;
CREATE TABLE `log` (
  `log_id` INT(10) NOT NULL,
  `usr_id` INT(10) NOT NULL,
  `fld_id` INT(10) NOT NULL,
  `log_dtt` DATETIME NOT NULL,
  `log_initial_value` VARCHAR(100) CHARACTER SET utf8   NULL,
  `log_new_value` VARCHAR(100) CHARACTER SET utf8   NULL,
  PRIMARY KEY (`log_id`),
  CONSTRAINT `FK_log_fields_per_screen` FOREIGN KEY `FK_log_fields_per_screen` (`fld_id`)
    REFERENCES `fields_per_screen` (`fld_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK_log_user` FOREIGN KEY `FK_log_user` (`usr_id`)
    REFERENCES `user` (`usr_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;


DROP TABLE IF EXISTS `Calender_Day_Schedule`;
CREATE TABLE `Calender_Day_Schedule` (
  `Schedule_Id` INT(10) NOT NULL,
  `Calender_Id` INT(10) NOT NULL,
  `School_Id` INT(10) NOT NULL,
  `Schedule_Day` LONGTEXT CHARACTER SET utf8   NOT NULL,
  `Start_Time` LONGTEXT CHARACTER SET utf8   NOT NULL,
  `End_Time` LONGTEXT CHARACTER SET utf8   NOT NULL,
  PRIMARY KEY (`Schedule_Id`),
  CONSTRAINT `FK_Calender_Day_Schedule_Calender_Details` FOREIGN KEY `FK_Calender_Day_Schedule_Calender_Details` (`Calender_Id`)
    REFERENCES `Calender_Details` (`Caleder_Id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK_Calender_Day_Schedule_schools` FOREIGN KEY `FK_Calender_Day_Schedule_schools` (`School_Id`)
    REFERENCES `schools` (`sch_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;


DROP TABLE IF EXISTS `access_per_user`;
CREATE TABLE `access_per_user` (
  `usr_id` INT(10) NOT NULL,
  `fun_id` INT(10) NOT NULL,
  PRIMARY KEY (`usr_id`, `fun_id`),
  CONSTRAINT `FK_access_per_user_access_per_user` FOREIGN KEY `FK_access_per_user_access_per_user` (`usr_id`, `fun_id`)
    REFERENCES `access_per_user` (`usr_id`, `fun_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK_access_per_user_function` FOREIGN KEY `FK_access_per_user_function` (`fun_id`)
    REFERENCES `function` (`fun_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;


DROP TABLE IF EXISTS `Calender_WeekEnd_Schedule`;
CREATE TABLE `Calender_WeekEnd_Schedule` (
  `WeekEnd_id` INT(10) NOT NULL,
  `Calender_Id` INT(10) NULL,
  `School_Id` INT(10) NULL,
  `WeekEnd_Day` LONGTEXT CHARACTER SET utf8   NOT NULL,
  PRIMARY KEY (`WeekEnd_id`),
  CONSTRAINT `FK_Calender_WeekEnd_Schedule_Calender_Details` FOREIGN KEY `FK_Calender_WeekEnd_Schedule_Calender_Details` (`Calender_Id`)
    REFERENCES `Calender_Details` (`Caleder_Id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK_Calender_WeekEnd_Schedule_schools` FOREIGN KEY `FK_Calender_WeekEnd_Schedule_schools` (`School_Id`)
    REFERENCES `schools` (`sch_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;











DROP TABLE IF EXISTS `school_years`;
CREATE TABLE `school_years` (
  `schyr_id` INT(10) NOT NULL,
  `schyr_start_date` DATETIME NOT NULL,
  `schyr_end_date` DATETIME NOT NULL,
  `schyr_short_nm` VARCHAR(10) CHARACTER SET utf8   NOT NULL,
  `schyr_nm` VARCHAR(25) CHARACTER SET utf8   NOT NULL,
  `schyr_year` SMALLINT(5) NOT NULL,
  `last_updated` DATETIME NULL,
  `schyr_next_year` INT(10) NOT NULL,
  `schyr_prev_year` INT(10) NOT NULL,
  `years_type_id` INT(10) NULL,
  PRIMARY KEY (`schyr_id`),
UNIQUE INDEX `PK__school_years__173876EA` (`schyr_id`)
)
ENGINE = INNODB;


DROP TABLE IF EXISTS `school_school_years`;
CREATE TABLE `school_school_years` (
  `sch_sch_year_id` INT(10) NOT NULL,
  `schyr_id` INT(10) NOT NULL,
  `sch_id` INT(10) NOT NULL,
  `cluster_id` INT(10) NOT NULL,
  `sch_principal_title` VARCHAR(5) CHARACTER SET utf8   NOT NULL,
  `sch_principal_last_nm` VARCHAR(50) CHARACTER SET utf8   NOT NULL,
  `sch_principal_first_nm` VARCHAR(50) CHARACTER SET utf8   NOT NULL,
  `sch_principal_middle_nm` VARCHAR(50) CHARACTER SET utf8   NULL,
  `last_updated` DATETIME NULL,
  `sch_title1_ind` CHAR(1) CHARACTER SET utf8   NULL,
  PRIMARY KEY (`sch_sch_year_id`, `schyr_id`, `sch_id`, `cluster_id`)
)
ENGINE = INNODB;


DROP TABLE IF EXISTS `sch_schedule`;
CREATE TABLE `sch_schedule` (
  `sch_shl` DATETIME NOT NULL,
  `schyr_id` INT(10) NOT NULL,
  `tch_id` INT(10) NOT NULL,
  `sbj_id` INT(10) NOT NULL,
  PRIMARY KEY (`sch_shl`, `schyr_id`, `tch_id`, `sbj_id`),
  CONSTRAINT `FK__sch_sched__schyr__3C69FB99` FOREIGN KEY `FK__sch_sched__schyr__3C69FB99` (`schyr_id`)
    REFERENCES `school_years` (`schyr_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK__sch_schedule__6166761E` FOREIGN KEY `FK__sch_schedule__6166761E` (`tch_id`, `sbj_id`)
    REFERENCES `tch_join_sbj` (`tch_id`, `sbj_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK__sch_schedule__625A9A57` FOREIGN KEY `FK__sch_schedule__625A9A57` (`tch_id`, `sbj_id`)
    REFERENCES `tch_join_sbj` (`tch_id`, `sbj_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK__sch_schedule__634EBE90` FOREIGN KEY `FK__sch_schedule__634EBE90` (`tch_id`, `sbj_id`)
    REFERENCES `tch_join_sbj` (`tch_id`, `sbj_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;


DROP TABLE IF EXISTS `sch_marking_periods`;
CREATE TABLE `sch_marking_periods` (
  `sch_marking_period_id` INT(10) NOT NULL,
  `sch_marking_period_type` CHAR(1) CHARACTER SET utf8   NOT NULL,
  `sch_mp_start_date` DATETIME NOT NULL,
  `sch_mp_end_date` DATETIME NOT NULL,
  `sch_mp_attendance_ind` CHAR(1) CHARACTER SET utf8   NOT NULL,
  `sch_mp_grading_ind` CHAR(1) CHARACTER SET utf8   NOT NULL,
  `sch_mp_grd_start_date` DATETIME NULL,
  `sch_mp_grd_end_date` DATETIME NULL,
  `sch_id` INT(10) NOT NULL,
  `schyr_id` INT(10) NOT NULL,
  `sch_mp_name` CHAR(25) CHARACTER SET utf8   NOT NULL,
  `sch_mp_short_nm` CHAR(5) CHARACTER SET utf8   NOT NULL,
  `last_updated` DATETIME NULL,
  PRIMARY KEY (`sch_marking_period_id`)
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `enrollment_codes`;
CREATE TABLE `enrollment_codes` (
  `enr_cd_type` VARCHAR(5) CHARACTER SET utf8   NOT NULL,
  `enr_cd_short_nm` VARCHAR(10) CHARACTER SET utf8   NOT NULL,
  `enr_cd_nm` VARCHAR(25) CHARACTER SET utf8   NOT NULL,
  `last_updated` DATETIME NOT NULL,
  `enr_cd_id` INT(10) NOT NULL,
  `schyr_id` INT(10) NULL,
  PRIMARY KEY (`enr_cd_id`),
  CONSTRAINT `FK_enrollment_codes_school_years` FOREIGN KEY `FK_enrollment_codes_school_years` (`schyr_id`)
    REFERENCES `school_years` (`schyr_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;


DROP TABLE IF EXISTS `student_enrollment`;
CREATE TABLE `student_enrollment` (
  `stu_enr_id` INT(10) NOT NULL,
  `enr_start_dt` DATETIME NOT NULL,
  `enr_end_dt` DATETIME NOT NULL,
  `enr_title1_ind` CHAR(1) CHARACTER SET utf8   NOT NULL,
  `next_sch_id` INT(10) NOT NULL,
  `last_sch_id` INT(10) NOT NULL,
  `stu_id` INT(10) NOT NULL,
  `sch_id` INT(10) NOT NULL,
  `schyr_id` INT(10) NOT NULL,
  `enr_sped_ind` CHAR(1) CHARACTER SET utf8   NOT NULL,
  `enr_cd_id` INT(10) NOT NULL,
  `last_updated` DATETIME NULL,
  `enr_free_red_ind` CHAR(1) CHARACTER SET utf8   NOT NULL,
  `enr_hmls_sts_ind` CHAR(1) CHARACTER SET utf8   NOT NULL,
  `enr_gifted_ind` CHAR(1) CHARACTER SET utf8   NULL,
  `grd_lvl_id` INT(10) NULL,
  PRIMARY KEY (`stu_enr_id`),
  CONSTRAINT `FK__student_e__grd_l__5070F446` FOREIGN KEY `FK__student_e__grd_l__5070F446` (`grd_lvl_id`)
    REFERENCES `grade_levels` (`grd_lvl_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK__student_e__sch_i__52593CB8` FOREIGN KEY `FK__student_e__sch_i__52593CB8` (`sch_id`)
    REFERENCES `schools` (`sch_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK__student_e__stu_i__5165187F` FOREIGN KEY `FK__student_e__stu_i__5165187F` (`stu_id`)
    REFERENCES `student` (`stu_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK_student_enrollment_enrollment_codes` FOREIGN KEY `FK_student_enrollment_enrollment_codes` (`enr_cd_id`)
    REFERENCES `enrollment_codes` (`enr_cd_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `stuenr_join_sbj`;
CREATE TABLE `stuenr_join_sbj` (
  `stu_enr_id` INT(10) NOT NULL,
  `tch_id` INT(10) NOT NULL,
  `sbj_id` INT(10) NOT NULL,
  PRIMARY KEY (`stu_enr_id`, `tch_id`, `sbj_id`),
  CONSTRAINT `FK__stuenr_jo__stu_e__59FA5E80` FOREIGN KEY `FK__stuenr_jo__stu_e__59FA5E80` (`stu_enr_id`)
    REFERENCES `student_enrollment` (`stu_enr_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK__stuenr_join_sbj__0F2D40CE` FOREIGN KEY `FK__stuenr_join_sbj__0F2D40CE` (`tch_id`, `sbj_id`)
    REFERENCES `tch_join_sbj` (`tch_id`, `sbj_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK__stuenr_join_sbj__10216507` FOREIGN KEY `FK__stuenr_join_sbj__10216507` (`tch_id`, `sbj_id`)
    REFERENCES `tch_join_sbj` (`tch_id`, `sbj_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK__stuenr_join_sbj__11158940` FOREIGN KEY `FK__stuenr_join_sbj__11158940` (`tch_id`, `sbj_id`)
    REFERENCES `tch_join_sbj` (`tch_id`, `sbj_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `Student_Adddress_Details`;
CREATE TABLE `Student_Adddress_Details` (
  `std_add_id` INT(10) NOT NULL,
  `std_id` INT(10) NOT NULL,
  `add_id` INT(10) NOT NULL,
  `add_value` LONGTEXT CHARACTER  SET utf8  NULL,
  `def_field_id` INT(10) NOT NULL,
  `cat_id` INT(10) NULL,
  `sch_id` INT(10) NOT NULL,
  PRIMARY KEY (`std_add_id`)
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `student_picture`;
CREATE TABLE `student_picture` (
  `std_pic_id` INT(10) NOT NULL,
  `std_id` INT(10) NOT NULL,
  `Sch_id` INT(10) NOT NULL,
  `name` LONGTEXT CHARACTER  SET utf8  NULL,
  PRIMARY KEY (`std_pic_id`),
  CONSTRAINT `FK_student_picture_student_school` FOREIGN KEY `FK_student_picture_student_school` (`std_id`)
    REFERENCES `student_school` (`std_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `FK_student_picture_schools` FOREIGN KEY `FK_student_picture_schools` (`Sch_id`)
    REFERENCES `schools` (`sch_id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `Student_Setup_ViewFormLayout_Order`;
CREATE TABLE `Student_Setup_ViewFormLayout_Order`(
	`Sort_Order_Id` INT(10) NOT NULL AUTO_INCREMENT ,
	`Field_Id` INT(10) NOT NULL,
	`Sch_Id` INT(10) NOT NULL,
	`FL_FieldType` CHAR(2) NOT NULL,
	`Sort_Order` INT(10) NOT NULL,
	`Cat_Id` INT(10) NOT NULL,
	PRIMARY KEY (`Sort_Order_Id`)
)
ENGINE = INNODB;


INSERT person_relationship (person_rel_id, person_rel_type_cd, person_stu_rel_type_nm, last_updated) VALUES(1, NULL, N'Father', NULL)
, (2, NULL, N'Mother', NULL)
, (3, NULL, N'Step Mother', NULL)
, (4, NULL, N'Step Father', NULL)
, (5, NULL, N'Grandmother', NULL)
, (6, NULL, N'Grandfather', NULL)
, (7, NULL, N'Legal guardian', NULL)
, (8, NULL, N'Other Family Member', NULL)

#ENGINE = INNODB;










INSERT `SubMenu_Multilingual` (`SubMenu_id`, `Main_menu_id`, `SubMenu_Header`, `URL`, `Visible`) VALUES (N'1         ', N'2         ', N'Portal de Notas', N'School\\PortalNotes.aspx', N'V         ')
, (N'2         ', N'2         ', N'Información de la Escuela', N'School\\SchoolDetails.aspx', N'V         ')
, (N'3         ', N'2         ', N'Añadir una Escuela', N'School\\SchoolDetails.aspx', N'I         ')
, (N'4         ', N'2         ', N'Copia Escuela', N'UnderConstruction.aspx', N'I         ')
, (N'5         ', N'2         ', N'Los períodos de marcado', N'School\\MarkingPeriods.aspx', N'V         ')
, (N'6         ', N'2         ', N'Calendarios', N'Calendar\\Index.aspx', N'V         ')
, (N'7         ', N'2         ', N'Períodos', N'School\\Period.aspx', N'V         ')
, (N'8         ', N'2         ', N'Niveles de Grado', N'School\\GradeLevel.aspx', N'V         ')
, (N'180       ', N'27        ', N'Verwaltung', N'UnderConstruction.aspx', N'V         ')
, (N'10        ', N'3         ', N'Información para Estudiantes', N'Student\\StudentInfo.aspx', N'V         ')
, (N'11        ', N'3         ', N'Añadir un estudiante', N'Student\\AddStudent.aspx', N'V         ')
, (N'12        ', N'3         ', N'Grupo Asignar Información del Estudiante', N'UnderConstruction.aspx', N'V         ')
, (N'13        ', N'3         ', N'Associate los padres con estudiantes', N'UnderConstruction.aspx', N'V         ')
, (N'14        ', N'3         ', N'Informes ', N'UnderConstruction.aspx', N'V         ')
, (N'15        ', N'3         ', N'El programa de instalación', N'Student\\StudentSetup.aspx', N'V         ')
, (N'16        ', N'4         ', N'Info de Usuario', N'UnderConstruction.aspx', N'V         ')
, (N'17        ', N'4         ', N'Añadir un usuario', N'UnderConstruction.aspx', N'V         ')
, (N'18        ', N'4         ', N'Associate estudiantes con los padres', N'UnderConstruction.aspx', N'V         ')
, (N'19        ', N'4         ', N'Preferencias', N'UnderConstruction.aspx', N'V         ')
, (N'20        ', N'4         ', N'El programa de instalación', N'UnderConstruction.aspx', N'V         ')
, (N'21        ', N'4         ', N'Profesor Programas', N'UnderConstruction.aspx', N'V         ')
, (N'22        ', N'5         ', N'Estudiante programa', N'UnderConstruction.aspx', N'V         ')
, (N'23        ', N'5         ', N'Pide estudiante', N'UnderConstruction.aspx', N'V         ')
, (N'24        ', N'5         ', N'Grupo Horario', N'UnderConstruction.aspx', N'V         ')
, (N'25        ', N'5         ', N'Grupo Pide', N'UnderConstruction.aspx', N'V         ')
, (N'26        ', N'5         ', N'Grupo Suelta', N'UnderConstruction.aspx', N'V         ')
, (N'27        ', N'5         ', N'Informes', N'UnderConstruction.aspx', N'V         ')
, (N'28        ', N'5         ', N'El programa de instalación', N'UnderConstruction.aspx', N'V         ')
, (N'29        ', N'6         ', N'Informe Tarjetas', N'UnderConstruction.aspx', N'V         ')
, (N'30        ', N'6         ', N'Calcular GPA', N'UnderConstruction.aspx', N'V         ')
, (N'31        ', N'6         ', N'Transcripciones', N'UnderConstruction.aspx', N'V         ')
, (N'32        ', N'6         ', N'Transcripciones rápido', N'UnderConstruction.aspx', N'V         ')
, (N'33        ', N'6         ', N'Informes', N'UnderConstruction.aspx', N'V         ')
, (N'34        ', N'6         ', N'El programa de instalación', N'UnderConstruction.aspx', N'V         ')
, (N'35        ', N'6         ', N'Utilidades', N'UnderConstruction.aspx', N'V         ')
, (N'36        ', N'7         ', N'Administración', N'UnderConstruction.aspx', N'V         ')
, (N'37        ', N'7         ', N'Añadir Ausencias', N'UnderConstruction.aspx', N'V         ')
, (N'38        ', N'7         ', N'Informes', N'UnderConstruction.aspx', N'V         ')
, (N'39        ', N'7         ', N'Utilidades', N'UnderConstruction.aspx', N'V         ')
, (N'40        ', N'7         ', N'El programa de instalación', N'UnderConstruction.aspx', N'V         ')
, (N'181       ', N'27        ', N'Add Abwesenheiten', N'UnderConstruction.aspx', N'V         ')
, (N'182       ', N'27        ', N'Berichte', N'UnderConstruction.aspx', N'V         ')
, (N'183       ', N'27        ', N' Utilities', N'UnderConstruction.aspx', N'V         ')
, (N'184       ', N'27        ', N'Setup', N'UnderConstruction.aspx', N'V         ')
, (N'185       ', N'28        ', N'Studierende Bildschirm', N'UnderConstruction.aspx', N'V         ')
, (N'186       ', N'28        ', N'Add Aktivitätsart', N'UnderConstruction.aspx', N'V         ')
, (N'187       ', N'28        ', N'Berichte', N'UnderConstruction.aspx', N'V         ')
, (N'188       ', N'28        ', N'Setup', N'UnderConstruction.aspx', N'V         ')
, (N'189       ', N'29        ', N'Backup-Datenbank', N'UnderConstruction.aspx', N'V         ')
, (N'190       ', N'29        ', N'Datenbank wiederherstellen', N'UnderConstruction.aspx', N'V         ')
, (N'191       ', N'30        ', N'Test-Sub-Menü 1', N'UnderConstruction.aspx', N'V         ')
, (N'41        ', N'8         ', N'Estudiante de pantalla', N'UnderConstruction.aspx', N'V         ')
, (N'42        ', N'8         ', N'Añadir Actividad', N'UnderConstruction.aspx', N'V         ')
, (N'43        ', N'8         ', N'Informes', N'UnderConstruction.aspx', N'V         ')
, (N'44        ', N'8         ', N'El programa de instalación', N'UnderConstruction.aspx', N'V         ')
, (N'45        ', N'9         ', N'Base de datos de copia de seguridad', N'UnderConstruction.aspx', N'V         ')
, (N'46        ', N'9         ', N'Restaurar la base de datos', N'UnderConstruction.aspx', N'V         ')
, (N'47        ', N'10        ', N'Prueba Sub Menú 1', N'UnderConstruction.aspx', N'V         ')
, (N'48        ', N'10        ', N'Prueba Sub Menú 2', N'UnderConstruction.aspx', N'V         ')
, (N'97        ', N'12        ', N'Portale Note', N'School\\PortalNotes.aspx', N'V         ')
, (N'98        ', N'12        ', N'Informazione della Scuola', N'School\\SchoolDetails.aspx', N'V         ')
, (N'99        ', N'12        ', N'Aggiungi una scuola', N'School\\SchoolDetails.aspx', N'I         ')
, (N'100       ', N'12        ', N'Copia Scuola', N'UnderConstruction.aspx', N'I         ')
, (N'101       ', N'12        ', N'Marcatura Periodi', N'School\\MarkingPeriods.aspx', N'V         ')
, (N'102       ', N'12        ', N'Calendari', N'Calendar\\Index.aspx', N'V         ')
, (N'103       ', N'12        ', N'Periodi', N'School\\Period.aspx', N'V         ')
, (N'104       ', N'12        ', N'Grado Livelli', N'School\\GradeLevel.aspx', N'V         ')
, (N'482       ', N'49        ', N'Опрокидыванием', N'UnderConstruction.aspx', N'V         ')
, (N'106       ', N'13        ', N'Info studenti', N'Student\\StudentInfo.aspx', N'V         ')
, (N'107       ', N'13        ', N'Aggiungi un Studenti', N'Student\\AddStudent.aspx', N'V         ')
, (N'108       ', N'13        ', N'Gruppo Assegna studenti Info', N'UnderConstruction.aspx', N'V         ')
, (N'109       ', N'13        ', N'Associato Genitori con gli studenti', N'UnderConstruction.aspx', N'V         ')
, (N'110       ', N'13        ', N'Rapporti', N'UnderConstruction.aspx', N'V         ')
, (N'111       ', N'13        ', N'Impostazione', N'Student\\StudentSetup.aspx', N'V         ')
, (N'112       ', N'14        ', N'Info Utente', N'UnderConstruction.aspx', N'V         ')
, (N'113       ', N'14        ', N'Aggiungere un utente', N'UnderConstruction.aspx', N'V         ')
, (N'114       ', N'14        ', N'Associato studenti con genitori', N'UnderConstruction.aspx', N'V         ')
, (N'115       ', N'14        ', N'Preferenze ', N'UnderConstruction.aspx', N'V         ')
, (N'116       ', N'14        ', N'Impostazione', N'UnderConstruction.aspx', N'V         ')
, (N'117       ', N'14        ', N'Insegnante Programmi', N'UnderConstruction.aspx', N'V         ')
, (N'118       ', N'15        ', N'Studente Scadenzario', N'UnderConstruction.aspx', N'V         ')
, (N'119       ', N'15        ', N'Richieste degli studenti', N'UnderConstruction.aspx', N'V         ')
, (N'120       ', N'15        ', N'Gruppo Scadenzario', N'UnderConstruction.aspx', N'V         ')
, (N'121       ', N'15        ', N'Le richieste del gruppo', N'UnderConstruction.aspx', N'V         ')
, (N'122       ', N'15        ', N'Gruppo Duplica', N'UnderConstruction.aspx', N'V         ')
, (N'123       ', N'15        ', N'Rapporti', N'UnderConstruction.aspx', N'V         ')
, (N'124       ', N'15        ', N'Impostazione', N'UnderConstruction.aspx', N'V         ')
, (N'125       ', N'16        ', N'Relazione Cards', N'UnderConstruction.aspx', N'V         ')
, (N'126       ', N'16        ', N'Calcolare GPA', N'UnderConstruction.aspx', N'V         ')
, (N'127       ', N'16        ', N'Trascrizioni', N'UnderConstruction.aspx', N'V         ')
, (N'128       ', N'16        ', N'Fast trascrizioni', N'UnderConstruction.aspx', N'V         ')
, (N'129       ', N'16        ', N'Rapporti', N'UnderConstruction.aspx', N'V         ')
, (N'130       ', N'16        ', N'Impostazione', N'UnderConstruction.aspx', N'V         ')
, (N'131       ', N'16        ', N'Utilità', N'UnderConstruction.aspx', N'V         ')
, (N'132       ', N'17        ', N'Amministrazione', N'UnderConstruction.aspx', N'V         ')
, (N'133       ', N'17        ', N'Aggiungi Assenze', N'UnderConstruction.aspx', N'V         ')
, (N'134       ', N'17        ', N'Rapporti', N'UnderConstruction.aspx', N'V         ')
, (N'135       ', N'17        ', N'Utilità', N'UnderConstruction.aspx', N'V         ')
, (N'136       ', N'17        ', N'Impostazione', N'UnderConstruction.aspx', N'V         ')
, (N'137       ', N'18        ', N'Studente Screen', N'UnderConstruction.aspx', N'V         ')
, (N'138       ', N'18        ', N'Aggiungere Attività', N'UnderConstruction.aspx', N'V         ')

, (N'139       ', N'18        ', N'Rapporti', N'UnderConstruction.aspx', N'V         ')
, (N'483       ', N'69        ', N'Rollover', N'UnderConstruction.aspx', N'V         ')
, (N'49        ', N'52        ', N'ポータルのノート', N'School\\PortalNotes.aspx', N'V         ')
, (N'50        ', N'52        ', N'学校情報', N'School\\SchoolDetails.aspx', N'V         ')
, (N'51        ', N'52        ', N'学校に追加', N'School\\SchoolDetails.aspx', N'I         ')
, (N'52        ', N'52        ', N'コピー学校', N'UnderConstruction.aspx', N'I         ')
, (N'53        ', N'52        ', N'期間マーキング', N'School\\MarkingPeriods.aspx', N'V         ')
, (N'54        ', N'52        ', N'カレンダー', N'Calendar\\Index.aspx', N'V         ')
, (N'55        ', N'52        ', N'ピリオド', N'School\\Period.aspx', N'V         ')
, (N'56        ', N'52        ', N'学年レベル', N'School\\GradeLevel.aspx', N'V         ')
, (N'57        ', N'52        ', N'コース', N'UnderConstruction.aspx', N'V         ')
, (N'58        ', N'53        ', N'学生情報', N'Student\\StudentInfo.aspx', N'V         ')
, (N'59        ', N'53        ', N'学生に追加', N'Student\\AddStudent.aspx', N'V         ')
, (N'60        ', N'53        ', N'グループ割り当てる学生情報', N'UnderConstruction.aspx', N'V         ')
, (N'61        ', N'53        ', N'生徒と保護者准', N'UnderConstruction.aspx', N'V         ')
, (N'62        ', N'53        ', N'レポート', N'UnderConstruction.aspx', N'V         ')
, (N'63        ', N'53        ', N'セットアップ', N'Student\\StudentSetup.aspx', N'V         ')
, (N'64        ', N'54        ', N'ユーザー情報', N'UnderConstruction.aspx', N'V         ')
, (N'65        ', N'54        ', N'ユーザの追加', N'UnderConstruction.aspx', N'V         ')
, (N'66        ', N'54        ', N'両親と准学生', N'UnderConstruction.aspx', N'V         ')
, (N'67        ', N'54        ', N'環境設定', N'UnderConstruction.aspx', N'V         ')
, (N'68        ', N'54        ', N'セットアップ', N'UnderConstruction.aspx', N'V         ')
, (N'69        ', N'54        ', N'教師プログラム', N'UnderConstruction.aspx', N'V         ')
, (N'70        ', N'55        ', N'学生のスケジュール', N'UnderConstruction.aspx', N'V         ')
, (N'71        ', N'55        ', N'生徒のリクエスト', N'UnderConstruction.aspx', N'V         ')
, (N'72        ', N'55        ', N'グループスケジュール', N'UnderConstruction.aspx', N'V         ')
, (N'73        ', N'55        ', N'グループのリクエスト', N'UnderConstruction.aspx', N'V         ')
, (N'74        ', N'55        ', N'グループ中退', N'UnderConstruction.aspx', N'V         ')
, (N'75        ', N'55        ', N'レポート', N'UnderConstruction.aspx', N'V         ')
, (N'76        ', N'55        ', N'セットアップ', N'UnderConstruction.aspx', N'V         ')
, (N'77        ', N'56        ', N'レポートカード', N'UnderConstruction.aspx', N'V         ')
, (N'78        ', N'56        ', N'計算成績', N'UnderConstruction.aspx', N'V         ')
, (N'79        ', N'56        ', N'成績', N'UnderConstruction.aspx', N'V         ')
, (N'80        ', N'56        ', N'速い成績', N'UnderConstruction.aspx', N'V         ')
, (N'81        ', N'56        ', N'レポート', N'UnderConstruction.aspx', N'V         ')
, (N'82        ', N'56        ', N'セットアップ', N'UnderConstruction.aspx', N'V         ')
, (N'83        ', N'56        ', N'ユーティリティ', N'UnderConstruction.aspx', N'V         ')
, (N'84        ', N'57        ', N'投与', N'UnderConstruction.aspx', N'V         ')
, (N'85        ', N'57        ', N'欠勤に追加', N'UnderConstruction.aspx', N'V         ')
, (N'86        ', N'57        ', N'レポート', N'UnderConstruction.aspx', N'V         ')
, (N'87        ', N'57        ', N'ユーティリティ', N'UnderConstruction.aspx', N'V         ')
, (N'88        ', N'57        ', N'セットアップ', N'UnderConstruction.aspx', N'V         ')
, (N'89        ', N'58        ', N'学生画面', N'UnderConstruction.aspx', N'V         ')
, (N'90        ', N'58        ', N'活動に追加', N'UnderConstruction.aspx', N'V         ')
, (N'91        ', N'58        ', N'レポート', N'UnderConstruction.aspx', N'V         ')
, (N'92        ', N'58        ', N'セットアップ', N'UnderConstruction.aspx', N'V         ')
, (N'93        ', N'59        ', N'データベースのバックアップ', N'UnderConstruction.aspx', N'V         ')
, (N'94        ', N'59        ', N'データベースの復元', N'UnderConstruction.aspx', N'V         ')
, (N'95        ', N'60        ', N'試験サブメニュー1', N'UnderConstruction.aspx', N'V         ')
, (N'96        ', N'60        ', N'試験サブメニュー2', N'#', N'V         ')
, (N'204       ', N'33        ', N'Groupe Affecter des élèves Info', N'UnderConstruction.aspx', N'V         ')
, (N'205       ', N'33        ', N'Associate Les parents ayant des élèves', N'UnderConstruction.aspx', N'V         ')
, (N'206       ', N'33        ', N'Rapports', N'UnderConstruction.aspx', N'V         ')
, (N'207       ', N'33        ', N'Setup', N'Student\\StudentSetup.aspx', N'V         ')
, (N'208       ', N'34        ', N'Renseignements sur l''utilisateur', N'UnderConstruction.aspx', N'V         ')
, (N'209       ', N'34        ', N'Ajout d''un utilisateur', N'UnderConstruction.aspx', N'V         ')
, (N'210       ', N'34        ', N'Associate Les étudiants avec les parents', N'UnderConstruction.aspx', N'V         ')
, (N'211       ', N'34        ', N'Préférences', N'UnderConstruction.aspx', N'V         ')
, (N'212       ', N'34        ', N'Setup', N'UnderConstruction.aspx', N'V         ')
, (N'9         ', N'9         ', N'Rollover', N'UnderConstruction.aspx', N'V         ')
, (N'140       ', N'18        ', N'Impostazione', N'UnderConstruction.aspx', N'V         ')
, (N'141       ', N'19        ', N'Backup Database', N'UnderConstruction.aspx', N'V         ')
, (N'142       ', N'19        ', N'Ripristino del database', N'UnderConstruction.aspx', N'V         ')
, (N'143       ', N'20        ', N'Verifica Sub Menu 1', N'UnderConstruction.aspx', N'V         ')
, (N'144       ', N'20        ', N'Verifica Sub Menu 2', N'UnderConstruction.aspx', N'V         ')
, (N'145       ', N'22        ', N'Portal stellt fest', N'School\\PortalNotes.aspx', N'V         ')
, (N'146       ', N'22        ', N'Schule Auskunft', N'School\\SchoolDetails.aspx', N'V         ')
, (N'147       ', N'22        ', N'Hinzufügen einer Schule', N'School\\SchoolDetails.aspx', N'I         ')
, (N'148       ', N'22        ', N'Kopieren Schule', N'UnderConstruction.aspx', N'I         ')
, (N'149       ', N'22        ', N'Kennzeichnung Periods', N'School\\MarkingPeriods.aspx', N'V         ')
, (N'150       ', N'22        ', N'Kalender', N'Calendar\\Index.aspx', N'V         ')
, (N'151       ', N'22        ', N'Zeitraum', N'School\\Period.aspx', N'V         ')
, (N'152       ', N'22        ', N'Note Stufen', N'School\\GradeLevel.aspx', N'V         ')
, (N'153       ', N'29        ', N'Überrollgefahr', N'UnderConstruction.aspx', N'V         ')
, (N'154       ', N'23        ', N'Informationen für Studenten', N'Student\\StudentInfo.aspx', N'V         ')
, (N'155       ', N'23        ', N'Fügen Sie ein Student', N'Student\\AddStudent.aspx', N'V         ')
, (N'156       ', N'23        ', N'Gruppe zuordnen Informationen für Studenten', N'UnderConstruction.aspx', N'V         ')
, (N'157       ', N'23        ', N'Associate Eltern mit Studenten', N'UnderConstruction.aspx', N'V         ')
, (N'158       ', N'23        ', N'Berichte', N'UnderConstruction.aspx', N'V         ')
, (N'159       ', N'23        ', N'Setup', N'Student\\StudentSetup.aspx', N'V         ')
, (N'160       ', N'24        ', N'Benutzer Auskunft', N'UnderConstruction.aspx', N'V         ')
, (N'161       ', N'24        ', N'Hinzufügen eines neuen Nutzers', N'UnderConstruction.aspx', N'V         ')
, (N'162       ', N'24        ', N'Associate Studierende mit Eltern', N'UnderConstruction.aspx', N'V         ')
, (N'163       ', N'24        ', N'Einstellungen', N'UnderConstruction.aspx', N'V         ')
, (N'164       ', N'24        ', N'Setup', N'UnderConstruction.aspx', N'V         ')
, (N'165       ', N'24        ', N'Lehrer Programme', N'UnderConstruction.aspx', N'V         ')
, (N'166       ', N'25        ', N'Student Zeitplan', N'UnderConstruction.aspx', N'V         ')
, (N'167       ', N'25        ', N'Student anfordern', N'UnderConstruction.aspx', N'V         ')
, (N'168       ', N'25        ', N'Gruppe Zeitplan', N'UnderConstruction.aspx', N'V         ')
, (N'169       ', N'25        ', N'Gruppe anfordern', N'UnderConstruction.aspx', N'V         ')
, (N'170       ', N'25        ', N'Gruppe Tropfen', N'UnderConstruction.aspx', N'V         ')
, (N'171       ', N'25        ', N'Berichte', N'UnderConstruction.aspx', N'V         ')
, (N'172       ', N'25        ', N'Setup', N'UnderConstruction.aspx', N'V         ')
, (N'173       ', N'26        ', N'Bericht Cards', N'UnderConstruction.aspx', N'V         ')
, (N'174       ', N'26        ', N'Berechnung GPA', N'UnderConstruction.aspx', N'V         ')
, (N'175       ', N'26        ', N'Transcripts', N'UnderConstruction.aspx', N'V         ')
, (N'176       ', N'26        ', N'Schnell Transcripts', N'UnderConstruction.aspx', N'V         ')
, (N'177       ', N'26        ', N'Berichte', N'UnderConstruction.aspx', N'V         ')
, (N'178       ', N'26        ', N'Setup', N'UnderConstruction.aspx', N'V         ')
, (N'179       ', N'26        ', N'Utility', N'UnderConstruction.aspx', N'V         ')
, (N'193       ', N'32        ', N'Portail Notes', N'School\\PortalNotes.aspx', N'V         ')

, (N'194       ', N'32        ', N'Renseignements sur l''école', N'School\\SchoolDetails.aspx', N'V         ')
, (N'195       ', N'32        ', N'Ajouter une école', N'School\\SchoolDetails.aspx', N'I         ')
, (N'196       ', N'32        ', N'École de copie', N'UnderConstruction.aspx', N'I         ')
, (N'197       ', N'32        ', N'Marquage Periods', N'School\\MarkingPeriods.aspx', N'V         ')
, (N'198       ', N'32        ', N'Calendriers', N'Calendar\\Index.aspx', N'V         ')
, (N'199       ', N'32        ', N'Périodes', N'School\\Period.aspx', N'V         ')
, (N'200       ', N'32        ', N'Grade Niveaux', N'School\\GradeLevel.aspx', N'V         ')
, (N'484       ', N'59        ', N'ロールオーバー', N'UnderConstruction.aspx', N'V         ')
, (N'486       ', N'99        ', N'侧翻', N'UnderConstruction.aspx', N'V         ')
, (N'203       ', N'33        ', N'Ajouter un étudiant', N'Student\\AddStudent.aspx', N'V         ')
, (N'192       ', N'30        ', N'Test-Sub-Menü 2', N'UnderConstruction.aspx', N'V         ')
, (N'488       ', N'34        ', N'Enseignant Programmes', N'UnderConstruction.aspx', N'V         ')
, (N'489       ', N'35        ', N'Horaire des élèves', N'UnderConstruction.aspx', N'V         ')
, (N'490       ', N'25        ', N'Etudiant Prie', N'UnderConstruction.aspx', N'V         ')
, (N'216       ', N'35        ', N'Groupe horaire', N'UnderConstruction.aspx', N'V         ')
, (N'217       ', N'35        ', N'Demande Groupe', N'UnderConstruction.aspx', N'V         ')
, (N'218       ', N'35        ', N'Groupe Drops', N'UnderConstruction.aspx', N'V         ')
, (N'219       ', N'35        ', N'Rapports', N'UnderConstruction.aspx', N'V         ')
, (N'220       ', N'35        ', N'Setup', N'UnderConstruction.aspx', N'V         ')
, (N'221       ', N'36        ', N'Rapport Cartes', N'UnderConstruction.aspx', N'V         ')
, (N'222       ', N'36        ', N'Calculer GPA', N'UnderConstruction.aspx', N'V         ')
, (N'223       ', N'36        ', N'Transcription', N'UnderConstruction.aspx', N'V         ')
, (N'224       ', N'36        ', N'Rapidement Transcription', N'UnderConstruction.aspx', N'V         ')
, (N'225       ', N'36        ', N'Rapports', N'UnderConstruction.aspx', N'V         ')
, (N'226       ', N'36        ', N'Setup', N'UnderConstruction.aspx', N'V         ')
, (N'227       ', N'36        ', N'Utilitaires', N'UnderConstruction.aspx', N'V         ')
, (N'228       ', N'37        ', N'Administration', N'UnderConstruction.aspx', N'V         ')
, (N'229       ', N'37        ', N'Ajouter Absences', N'UnderConstruction.aspx', N'V         ')
, (N'230       ', N'37        ', N'Rapports', N'UnderConstruction.aspx', N'V         ')
, (N'231       ', N'37        ', N'Utilitaires', N'UnderConstruction.aspx', N'V         ')
, (N'232       ', N'37        ', N'Setup', N'UnderConstruction.aspx', N'V         ')
, (N'233       ', N'38        ', N'Elève d''écran', N'UnderConstruction.aspx', N'V         ')
, (N'234       ', N'38        ', N'Ajouter activité', N'UnderConstruction.aspx', N'V         ')
, (N'235       ', N'38        ', N'Rapports', N'UnderConstruction.aspx', N'V         ')
, (N'236       ', N'38        ', N'Setup', N'UnderConstruction.aspx', N'V         ')
, (N'237       ', N'39        ', N'Sauvegarder la base de données', N'UnderConstruction.aspx', N'V         ')
, (N'238       ', N'39        ', N'Restaurer la base de données', N'UnderConstruction.aspx', N'V         ')
, (N'239       ', N'40        ', N'Test Sous Menu 1', N'UnderConstruction.aspx', N'V         ')
, (N'240       ', N'40        ', N'Test Sous Menu 2', N'UnderConstruction.aspx', N'V         ')
, (N'241       ', N'42        ', N'Портал Примечания', N'School\\PortalNotes.aspx', N'V         ')
, (N'242       ', N'42        ', N'Школьная Информация', N'School\\SchoolDetails.aspx', N'V         ')
, (N'243       ', N'42        ', N'Добавить школу', N'School\\SchoolDetails.aspx', N'I         ')
, (N'244       ', N'42        ', N'Копия школа', N'UnderConstruction.aspx', N'I         ')
, (N'245       ', N'42        ', N'Маркировка Периоды', N'School\\MarkingPeriods.aspx', N'V         ')
, (N'246       ', N'42        ', N'Календари', N'Calendar\\Index.aspx', N'V         ')
, (N'247       ', N'42        ', N'Периоды', N'School\\Period.aspx', N'V         ')
, (N'248       ', N'42        ', N'Оценка Уровни', N'School\\GradeLevel.aspx', N'V         ')
, (N'249       ', N'42        ', N'Курс ', N'UnderConstruction.aspx', N'V         ')
, (N'250       ', N'43        ', N'Студенческие Инфо', N'Student\\StudentInfo.aspx', N'V         ')
, (N'251       ', N'43        ', N'Добавить студента', N'Student\\AddStudent.aspx', N'V         ')
, (N'252       ', N'43        ', N'Группа Назначить Студенческая Инфо', N'UnderConstruction.aspx', N'V         ')
, (N'253       ', N'43        ', N'Ассоциированные Родители со студентами', N'UnderConstruction.aspx', N'V         ')
, (N'254       ', N'43        ', N'Отчеты', N'UnderConstruction.aspx', N'V         ')
, (N'255       ', N'43        ', N'Настройка', N'Student\\StudentSetup.aspx', N'V         ')
, (N'256       ', N'44        ', N'Пользователь Информация', N'UnderConstruction.aspx', N'V         ')
, (N'257       ', N'44        ', N'Добавить пользователя', N'UnderConstruction.aspx', N'V         ')
, (N'258       ', N'44        ', N'Ассоциированные Студенты с родителями', N'UnderConstruction.aspx', N'V         ')
, (N'259       ', N'44        ', N'Предпочтения', N'UnderConstruction.aspx', N'V         ')
, (N'260       ', N'44        ', N'Настройка', N'UnderConstruction.aspx', N'V         ')
, (N'261       ', N'44        ', N'Учитель программы', N'UnderConstruction.aspx', N'V         ')
, (N'262       ', N'45        ', N'Студенческие Расписание', N'UnderConstruction.aspx', N'V         ')
, (N'263       ', N'45        ', N'Студенческие просит', N'UnderConstruction.aspx', N'V         ')
, (N'264       ', N'45        ', N' группы Расписание', N'UnderConstruction.aspx', N'V         ')
, (N'265       ', N'45        ', N'Группа просит', N'UnderConstruction.aspx', N'V         ')
, (N'266       ', N'45        ', N'Группа капли', N'UnderConstruction.aspx', N'V         ')
, (N'267       ', N'45        ', N'Отчеты', N'UnderConstruction.aspx', N'V         ')
, (N'268       ', N'45        ', N'Настройка', N'UnderConstruction.aspx', N'V         ')
, (N'269       ', N'46        ', N'Доклад карты', N'UnderConstruction.aspx', N'V         ')
, (N'270       ', N'46        ', N'Рассчитать ГПД', N'UnderConstruction.aspx', N'V         ')
, (N'271       ', N'46        ', N'Стенограммы', N'UnderConstruction.aspx', N'V         ')
, (N'272       ', N'46        ', N'Быстрая Стенограммы', N'UnderConstruction.aspx', N'V         ')
, (N'273       ', N'46        ', N'Отчеты', N'UnderConstruction.aspx', N'V         ')
, (N'274       ', N'46        ', N'Настройка', N'UnderConstruction.aspx', N'V         ')
, (N'275       ', N'46        ', N'Утилиты', N'UnderConstruction.aspx', N'V         ')
, (N'276       ', N'47        ', N'Администрация', N'UnderConstruction.aspx', N'V         ')
, (N'277       ', N'47        ', N'Добавить Отсутствия', N'UnderConstruction.aspx', N'V         ')
, (N'278       ', N'47        ', N'Отчеты', N'UnderConstruction.aspx', N'V         ')
, (N'279       ', N'47        ', N'Утилиты', N'UnderConstruction.aspx', N'V         ')
, (N'280       ', N'47        ', N'Настройка', N'UnderConstruction.aspx', N'V         ')
, (N'281       ', N'48        ', N'Студенческие экрана', N'UnderConstruction.aspx', N'V         ')
, (N'282       ', N'48        ', N'Добавить деятельность', N'UnderConstruction.aspx', N'V         ')
, (N'283       ', N'48        ', N'Отчеты', N'UnderConstruction.aspx', N'V         ')
, (N'284       ', N'48        ', N'Настройка', N'UnderConstruction.aspx', N'V         ')
, (N'285       ', N'49        ', N'Резервное копирование базы данных', N'UnderConstruction.aspx', N'V         ')
, (N'286       ', N'49        ', N'Восстановление базы данных', N'UnderConstruction.aspx', N'V         ')
, (N'287       ', N'50        ', N'Тест подменю 1', N'#', N'V         ')
, (N'288       ', N'50        ', N'Тест подменю 2', N'#', N'V         ')
, (N'289       ', N'62        ', N'Portal Notas', N'School\\PortalNotes.aspx', N'V         ')
, (N'290       ', N'62        ', N'Informação sobre a escola', N'School\\SchoolDetails.aspx', N'V         ')
, (N'291       ', N'62        ', N'Adicionar uma Escola', N'School\\SchoolDetails.aspx', N'I         ')
, (N'292       ', N'62        ', N'Copie Escola', N'UnderConstruction.aspx', N'I         ')
, (N'293       ', N'62        ', N'Marcação Períodos', N'School\\MarkingPeriods.aspx', N'V         ')
, (N'294       ', N'62        ', N'Calendários', N'Calendar\\Index.aspx', N'V         ')
, (N'295       ', N'62        ', N'Períodos', N'School\\Period.aspx', N'V         ')
, (N'296       ', N'62        ', N'Grau Níveis', N'School\\GradeLevel.aspx', N'V         ')
, (N'297       ', N'62        ', N'Curso', N'UnderConstruction.aspx', N'V         ')
, (N'298       ', N'63        ', N'Info Estudante', N'Student\\StudentInfo.aspx', N'V         ')
, (N'299       ', N'63        ', N'Fazer um Estudante', N'Student\\AddStudent.aspx', N'V         ')
, (N'300       ', N'63        ', N'Grupo Atribuir Info Estudante', N'UnderConstruction.aspx', N'V         ')
, (N'301       ', N'63        ', N'Associate Os pais com os alunos', N'UnderConstruction.aspx', N'V         ')
, (N'302       ', N'63        ', N'Relatórios', N'UnderConstruction.aspx', N'V         ')

, (N'303       ', N'63        ', N'Configuração', N'Student\\StudentSetup.aspx', N'V         ')
, (N'304       ', N'64        ', N'Usuário Informação', N'UnderConstruction.aspx', N'V         ')
, (N'305       ', N'64        ', N'Adicione um usuário', N'UnderConstruction.aspx', N'V         ')
, (N'306       ', N'64        ', N'Associate Estudantes com Pais', N'UnderConstruction.aspx', N'V         ')
, (N'307       ', N'64        ', N'Preferências', N'UnderConstruction.aspx', N'V         ')
, (N'308       ', N'64        ', N'Configuração', N'UnderConstruction.aspx', N'V         ')
, (N'309       ', N'64        ', N'Professores Programas', N'UnderConstruction.aspx', N'V         ')
, (N'310       ', N'65        ', N'Estudante tabelar', N'UnderConstruction.aspx', N'V         ')
, (N'311       ', N'65        ', N'Estudante Pedidos', N'UnderConstruction.aspx', N'V         ')
, (N'312       ', N'65        ', N'Grupo Programação', N'UnderConstruction.aspx', N'V         ')
, (N'313       ', N'65        ', N'Grupo Pedidos', N'UnderConstruction.aspx', N'V         ')
, (N'314       ', N'65        ', N'Grupo Descarrega', N'UnderConstruction.aspx', N'V         ')
, (N'315       ', N'65        ', N'Relatórios', N'UnderConstruction.aspx', N'V         ')
, (N'316       ', N'65        ', N'Configuração', N'UnderConstruction.aspx', N'V         ')
, (N'317       ', N'66        ', N'Relatório Cartões', N'UnderConstruction.aspx', N'V         ')
, (N'318       ', N'66        ', N'Calcular GPA', N'UnderConstruction.aspx', N'V         ')
, (N'319       ', N'66        ', N'Transcrição', N'UnderConstruction.aspx', N'V         ')
, (N'320       ', N'66        ', N'Rápido Transcrição', N'UnderConstruction.aspx', N'V         ')
, (N'321       ', N'66        ', N'Relatórios', N'UnderConstruction.aspx', N'V         ')
, (N'322       ', N'66        ', N'Configuração', N'UnderConstruction.aspx', N'V         ')
, (N'323       ', N'66        ', N'Utilitários', N'UnderConstruction.aspx', N'V         ')
, (N'324       ', N'67        ', N'Administração', N'UnderConstruction.aspx', N'V         ')
, (N'325       ', N'67        ', N'Adicionar Ausência', N'UnderConstruction.aspx', N'V         ')
, (N'326       ', N'67        ', N'Relatórios', N'UnderConstruction.aspx', N'V         ')
, (N'327       ', N'67        ', N'Utilitários', N'UnderConstruction.aspx', N'V         ')
, (N'328       ', N'67        ', N'Configuração', N'UnderConstruction.aspx', N'V         ')
, (N'329       ', N'68        ', N'Estudante Tela', N'UnderConstruction.aspx', N'V         ')
, (N'330       ', N'68        ', N'Adicionar Actividade', N'UnderConstruction.aspx', N'V         ')
, (N'331       ', N'68        ', N'Relatórios', N'UnderConstruction.aspx', N'V         ')
, (N'332       ', N'68        ', N'Configuração', N'UnderConstruction.aspx', N'V         ')
, (N'333       ', N'69        ', N'cópia de segurança banco de dados', N'UnderConstruction.aspx', N'V         ')
, (N'334       ', N'69        ', N'Restaurar banco de dados', N'UnderConstruction.aspx', N'V         ')
, (N'335       ', N'70        ', N'Teste Sub-Menu 1', N'#', N'V         ')
, (N'336       ', N'70        ', N'Teste Sub-Menu 2', N'#', N'V         ')
, (N'337       ', N'82        ', N'بوابة الحواشي ', N'School\\PortalNotes.aspx', N'V         ')
, (N'338       ', N'82        ', N'المعلومات المدرسية', N'School\\SchoolDetails.aspx', N'V         ')
, (N'339       ', N'82        ', N'إضافة مدرسة', N'School\\SchoolDetails.aspx', N'I         ')
, (N'340       ', N'82        ', N'نسخة مدرسة', N'UnderConstruction.aspx', N'I         ')
, (N'341       ', N'82        ', N'علامات على فترات', N'School\\MarkingPeriods.aspx', N'V         ')
, (N'342       ', N'82        ', N'التقاويم', N'Calendar\\Index.aspx', N'V         ')
, (N'343       ', N'82        ', N'فترات', N'School\\Period.aspx', N'V         ')
, (N'344       ', N'82        ', N'المستويات الصف', N'School\\GradeLevel.aspx', N'V         ')
, (N'345       ', N'82        ', N'دورة تدريبية', N'UnderConstruction.aspx', N'V         ')
, (N'346       ', N'83        ', N'معلومات الطالب', N'Student\\StudentInfo.aspx', N'V         ')
, (N'347       ', N'83        ', N'أضف الطلبة', N'Student\\AddStudent.aspx', N'V         ')
, (N'348       ', N'83        ', N'مجموعة إسناد معلومات الطلاب', N'UnderConstruction.aspx', N'V         ')
, (N'349       ', N'83        ', N'المنتسبون الآباء مع طلاب', N'UnderConstruction.aspx', N'V         ')
, (N'350       ', N'83        ', N'تقارير', N'UnderConstruction.aspx', N'V         ')
, (N'351       ', N'83        ', N'دسيسة', N'Student\\StudentSetup.aspx', N'V         ')
, (N'352       ', N'84        ', N'معلومات مستخدم', N'UnderConstruction.aspx', N'V         ')
, (N'353       ', N'84        ', N'إضافة مستخدم', N'UnderConstruction.aspx', N'V         ')
, (N'354       ', N'84        ', N'  المنتسبين الطلاب مع الوالدين ', N'UnderConstruction.aspx', N'V         ')
, (N'355       ', N'84        ', N'التفضيلات', N'UnderConstruction.aspx', N'V         ')
, (N'356       ', N'84        ', N'دسيسة', N'UnderConstruction.aspx', N'V         ')
, (N'357       ', N'90        ', N'اختبار فرعية القائمة 2', N'UnderConstruction.aspx', N'V         ')
, (N'358       ', N'84        ', N'معلم البرامج', N'UnderConstruction.aspx', N'V         ')
, (N'359       ', N'85        ', N' طالب جدول مواعيد ', N'UnderConstruction.aspx', N'V         ')
, (N'360       ', N'85        ', N'يطلب الطالب ', N'UnderConstruction.aspx', N'V         ')
, (N'361       ', N'85        ', N'المجموعة جدول مواعيد', N'UnderConstruction.aspx', N'V         ')
, (N'362       ', N'85        ', N'يطلب المجموعة', N'UnderConstruction.aspx', N'V         ')
, (N'363       ', N'85        ', N'مجموعة قطرات', N'UnderConstruction.aspx', N'V         ')
, (N'364       ', N'85        ', N'تقارير', N'UnderConstruction.aspx', N'V         ')
, (N'365       ', N'85        ', N'دسيسة', N'UnderConstruction.aspx', N'V         ')
, (N'366       ', N'86        ', N'تقرير بطاقات', N'UnderConstruction.aspx', N'V         ')
, (N'367       ', N'86        ', N'حساب متوسط الدرجة نقطة', N'UnderConstruction.aspx', N'V         ')
, (N'368       ', N'86        ', N'المحاضر', N'UnderConstruction.aspx', N'V         ')
, (N'369       ', N'86        ', N'سرعة النسخ', N'UnderConstruction.aspx', N'V         ')
, (N'487       ', N'89        ', N'أدوات', N'UnderConstruction.aspx', N'V         ')
, (N'370       ', N'86        ', N'تقارير', N'UnderConstruction.aspx', N'V         ')
, (N'385       ', N'72        ', N'포탈 노트', N'School\\PortalNotes.aspx', N'V         ')
, (N'386       ', N'72        ', N'학교 정보', N'School\\SchoolDetails.aspx', N'V         ')
, (N'387       ', N'72        ', N'추가 스쿨', N'School\\SchoolDetails.aspx', N'I         ')
, (N'388       ', N'72        ', N'복사 학교', N'UnderConstruction.aspx', N'I         ')
, (N'389       ', N'72        ', N'기간 마킹', N'School\\MarkingPeriods.aspx', N'V         ')
, (N'390       ', N'72        ', N'달력', N'Calendar\\Index.aspx', N'V         ')
, (N'391       ', N'72        ', N'기간', N'School\\Period.aspx', N'V         ')
, (N'392       ', N'72        ', N'학년 레벨', N'School\\GradeLevel.aspx', N'V         ')
, (N'393       ', N'72        ', N'과정', N'UnderConstruction.aspx', N'V         ')
, (N'394       ', N'73        ', N'학생 정보', N'Student\\StudentInfo.aspx', N'V         ')
, (N'395       ', N'73        ', N'학생 추가', N'Student\\AddStudent.aspx', N'V         ')
, (N'396       ', N'73        ', N'그룹에 할당 학생 정보', N'UnderConstruction.aspx', N'V         ')
, (N'397       ', N'73        ', N'부교수 학부모 와 함께학생', N'UnderConstruction.aspx', N'V         ')
, (N'398       ', N'73        ', N'리포트', N'UnderConstruction.aspx', N'V         ')
, (N'399       ', N'73        ', N'설치', N'Student\\StudentSetup.aspx', N'V         ')
, (N'400       ', N'74        ', N'사용자 정보', N'UnderConstruction.aspx', N'V         ')
, (N'401       ', N'74        ', N'사용자 추가', N'UnderConstruction.aspx', N'V         ')
, (N'402       ', N'74        ', N'부교수 학부모 와 함께 학생', N'UnderConstruction.aspx', N'V         ')
, (N'403       ', N'74        ', N'환경 설정', N'UnderConstruction.aspx', N'V         ')
, (N'404       ', N'74        ', N'판으\\ 만들다', N'UnderConstruction.aspx', N'V         ')
, (N'405       ', N'74        ', N'교사 프\\그램', N'UnderConstruction.aspx', N'V         ')
, (N'406       ', N'75        ', N'학생 \\를 작성하다', N'UnderConstruction.aspx', N'V         ')
, (N'407       ', N'75        ', N'학생 요청', N'UnderConstruction.aspx', N'V         ')
, (N'408       ', N'75        ', N'그룹 일정', N'UnderConstruction.aspx', N'V         ')
, (N'409       ', N'75        ', N'그룹 요청', N'UnderConstruction.aspx', N'V         ')
, (N'410       ', N'75        ', N'그룹 드랍스', N'UnderConstruction.aspx', N'V         ')
, (N'411       ', N'75        ', N'리포트', N'UnderConstruction.aspx', N'V         ')
, (N'412       ', N'75        ', N'판으\\ 만들다', N'UnderConstruction.aspx', N'V         ')
, (N'413       ', N'76        ', N'리포트 카드', N'UnderConstruction.aspx', N'V         ')
, (N'414       ', N'76        ', N'계산 학점', N'UnderConstruction.aspx', N'V         ')
, (N'415       ', N'76        ', N'녹취`  ', N'UnderConstruction.aspx', N'V         ')
, (N'416       ', N'76        ', N'빠른 녹취`', N'UnderConstruction.aspx', N'V         ')

, (N'417       ', N'76        ', N'리포트', N'UnderConstruction.aspx', N'V         ')
, (N'418       ', N'76        ', N'판으\\ 만들다', N'UnderConstruction.aspx', N'V         ')
, (N'419       ', N'76        ', N'유틸리티', N'UnderConstruction.aspx', N'V         ')
, (N'420       ', N'77        ', N'행정', N'UnderConstruction.aspx', N'V         ')
, (N'421       ', N'77        ', N'결석 추가', N'UnderConstruction.aspx', N'V         ')
, (N'422       ', N'77        ', N'리포트', N'UnderConstruction.aspx', N'V         ')
, (N'423       ', N'77        ', N'유틸리티 ', N'UnderConstruction.aspx', N'V         ')
, (N'424       ', N'77        ', N'판으\\ 만들다', N'UnderConstruction.aspx', N'V         ')
, (N'425       ', N'78        ', N'학생 스크린', N'UnderConstruction.aspx', N'V         ')
, (N'426       ', N'78        ', N'\\동 추가', N'UnderConstruction.aspx', N'V         ')
, (N'427       ', N'78        ', N'리포트', N'UnderConstruction.aspx', N'V         ')
, (N'428       ', N'78        ', N'판으\\ 만들다', N'UnderConstruction.aspx', N'V         ')
, (N'429       ', N'79        ', N'데이터베이스 백업', N'UnderConstruction.aspx', N'V         ')
, (N'430       ', N'79        ', N'데이터베이스 복원', N'UnderConstruction.aspx', N'V         ')
, (N'431       ', N'80        ', N'시험 하위 메뉴 1', N'UnderConstruction.aspx', N'V         ')
, (N'432       ', N'80        ', N'시험 하위 메뉴 2', N'UnderConstruction.aspx', N'V         ')
, (N'433       ', N'92        ', N'门户网站注', N'School\\PortalNotes.aspx', N'V         ')
, (N'434       ', N'92        ', N'学校资料', N'School\\SchoolDetails.aspx', N'V         ')
, (N'435       ', N'92        ', N'添加学校', N'School\\SchoolDetails.aspx', N'I         ')
, (N'436       ', N'92        ', N'复制学校', N'UnderConstruction.aspx', N'I         ')
, (N'437       ', N'92        ', N'可塑期', N'School\\MarkingPeriods.aspx', N'V         ')
, (N'438       ', N'92        ', N'日历', N'Calendar\\Index.aspx', N'V         ')
, (N'439       ', N'92        ', N'期', N'School\\Period.aspx', N'V         ')
, (N'440       ', N'92        ', N'级各级', N'School\\GradeLevel.aspx', N'V         ')
, (N'441       ', N'92        ', N'课程', N'UnderConstruction.aspx', N'V         ')
, (N'442       ', N'93        ', N'学生信息', N'Student\\StudentInfo.aspx', N'V         ')
, (N'485       ', N'79        ', N'롤오버', N'UnderConstruction.aspx', N'V         ')
, (N'443       ', N'93        ', N'添加一个学生', N'Student\\AddStudent.aspx', N'V         ')
, (N'371       ', N'86        ', N'دسيسة', N'UnderConstruction.aspx', N'V         ')
, (N'372       ', N'86        ', N'المرافق', N'UnderConstruction.aspx', N'V         ')
, (N'373       ', N'87        ', N'الادارة', N'UnderConstruction.aspx', N'V         ')
, (N'374       ', N'87        ', N'إضافة الغياب ', N'UnderConstruction.aspx', N'V         ')
, (N'375       ', N'87        ', N' تقارير ', N'UnderConstruction.aspx', N'V         ')
, (N'376       ', N'87        ', N'المرافق', N'UnderConstruction.aspx', N'V         ')
, (N'377       ', N'87        ', N'دسيسة', N'UnderConstruction.aspx', N'V         ')
, (N'378       ', N'88        ', N'طالب الشاشة', N'UnderConstruction.aspx', N'V         ')
, (N'379       ', N'88        ', N'إضافة نشاط', N'UnderConstruction.aspx', N'V         ')
, (N'380       ', N'88        ', N'تقارير', N'UnderConstruction.aspx', N'V         ')
, (N'381       ', N'88        ', N'دسيسة', N'UnderConstruction.aspx', N'V         ')
, (N'444       ', N'93        ', N'集团指派学生信息', N'UnderConstruction.aspx', N'V         ')
, (N'445       ', N'93        ', N'关联父母 带有 学生', N'UnderConstruction.aspx', N'V         ')
, (N'446       ', N'93        ', N'报告', N'UnderConstruction.aspx', N'V         ')
, (N'447       ', N'93        ', N'设立', N'Student\\StudentSetup.aspx', N'V         ')
, (N'448       ', N'94        ', N'用户信息', N'UnderConstruction.aspx', N'V         ')
, (N'449       ', N'94        ', N'添加用户', N'UnderConstruction.aspx', N'V         ')
, (N'382       ', N'89        ', N'قاعدة البيانات الاحتياطية', N'UnderConstruction.aspx', N'V         ')
, (N'383       ', N'89        ', N'استعادة قاعدة البيانات', N'UnderConstruction.aspx', N'V         ')
, (N'384       ', N'90        ', N'اختبار فرعية القائمة 1', N'UnderConstruction.aspx', N'V         ')
, (N'450       ', N'94        ', N'协理学生带有父母', N'UnderConstruction.aspx', N'V         ')
, (N'451       ', N'94        ', N'使用偏好', N'UnderConstruction.aspx', N'V         ')
, (N'452       ', N'94        ', N'安排', N'UnderConstruction.aspx', N'V         ')
, (N'453       ', N'94        ', N'老师程序', N'UnderConstruction.aspx', N'V         ')
, (N'454       ', N'95        ', N'学生附表', N'UnderConstruction.aspx', N'V         ')
, (N'455       ', N'95        ', N'学生请求', N'UnderConstruction.aspx', N'V         ')
, (N'456       ', N'95        ', N'集团附表', N'UnderConstruction.aspx', N'V         ')
, (N'457       ', N'95        ', N'组要求', N'UnderConstruction.aspx', N'V         ')
, (N'458       ', N'95        ', N'组滴', N'UnderConstruction.aspx', N'V         ')
, (N'459       ', N'95        ', N'报告', N'UnderConstruction.aspx', N'V         ')
, (N'460       ', N'95        ', N'安排', N'UnderConstruction.aspx', N'V         ')
, (N'461       ', N'96        ', N'报告卡', N'UnderConstruction.aspx', N'V         ')
, (N'462       ', N'96        ', N'计算学分', N'UnderConstruction.aspx', N'V         ')
, (N'463       ', N'96        ', N'誊', N'UnderConstruction.aspx', N'V         ')
, (N'464       ', N'96        ', N'快速的誊', N'UnderConstruction.aspx', N'V         ')
, (N'465       ', N'96        ', N'报告', N'UnderConstruction.aspx', N'V         ')
, (N'466       ', N'96        ', N'安排', N'UnderConstruction.aspx', N'V         ')
, (N'467       ', N'96        ', N'实用工具', N'UnderConstruction.aspx', N'V         ')
, (N'468       ', N'97        ', N'管理', N'UnderConstruction.aspx', N'V         ')
, (N'469       ', N'97        ', N'添加缺勤', N'UnderConstruction.aspx', N'V         ')
, (N'470       ', N'97        ', N'报告', N'UnderConstruction.aspx', N'V         ')
, (N'471       ', N'97        ', N'实用工具', N'UnderConstruction.aspx', N'V         ')
, (N'472       ', N'97        ', N'安排', N'UnderConstruction.aspx', N'V         ')
, (N'473       ', N'98        ', N'学生屏幕', N'UnderConstruction.aspx', N'V         ')
, (N'474       ', N'98        ', N'添加活度', N'UnderConstruction.aspx', N'V         ')
, (N'475       ', N'98        ', N'报告', N'UnderConstruction.aspx', N'V         ')
, (N'476       ', N'98        ', N'安排', N'UnderConstruction.aspx', N'V         ')
, (N'477       ', N'99        ', N'备份数据库', N'UnderConstruction.aspx', N'V         ')
, (N'478       ', N'99        ', N'还原数据库', N'UnderConstruction.aspx', N'V         ')
, (N'479       ', N'100       ', N'试验小组菜单1', N'UnderConstruction.aspx', N'V         ')
, (N'480       ', N'100       ', N'试验小组菜单2', N'UnderConstruction.aspx', N'V         ')
, (N'213       ', N'2         ', N'Cursos', N'UnderConstruction.aspx', N'V         ')
, (N'214       ', N'12        ', N'Corso', N'UnderConstruction.aspx', N'V         ')
, (N'105       ', N'19        ', N'Rollover', N'UnderConstruction.aspx', N'V         ')
, (N'215       ', N'22        ', N'Kurse', N'UnderConstruction.aspx', N'V         ')
, (N'202       ', N'33        ', N'Etudiant Information', N'Student\\StudentInfo.aspx', N'V         ')
, (N'481       ', N'39        ', N'Rollover', N'UnderConstruction.aspx', N'V         ')
, (N'201       ', N'32        ', N'Cours', N'UnderConstruction.aspx', N'V         ')
, (N'492       ', N'101       ', N'Información Personal', N'Staff\\StaffInfo.aspx', N'V         ')
, (N'493       ', N'101       ', N'Añadir un nuevo Estatuto', N'Staff\\AddStaff.aspx', N'V         ')
, (N'494       ', N'101       ', N'Preferencias', N'UnderConstruction.aspx', N'V         ')
, (N'495       ', N'101       ', N'Informes de Personal', N'UnderConstruction.aspx', N'V         ')
, (N'496       ', N'101       ', N'Programas Maestros', N'UnderConstruction.aspx', N'V         ')
, (N'497       ', N'101       ', N'Configuración', N'UnderConstruction.aspx', N'V         ')
, (N'498       ', N'102       ', N'Personale  Info', N'Staff\\StaffInfo.aspx', N'V         ')
, (N'499       ', N'102       ', N'Aggiungi nuovo personale', N'Staff\\AddStaff.aspx', N'V         ')
, (N'500       ', N'102       ', N'Preferenze', N'UnderConstruction.aspx', N'V         ')
, (N'501       ', N'102       ', N'Personale  Reports', N'UnderConstruction.aspx', N'V         ')
, (N'502       ', N'102       ', N'Insegnante Programmi', N'UnderConstruction.aspx', N'V         ')
, (N'503       ', N'102       ', N'Setup ', N'UnderConstruction.aspx', N'V         ')
, (N'504       ', N'103       ', N'Personal Info', N'Staff\\StaffInfo.aspx', N'V         ')
, (N'505       ', N'103       ', N'Neues Personal', N'Staff\\AddStaff.aspx', N'V         ')
, (N'506       ', N'103       ', N'Einstellungen', N'UnderConstruction.aspx', N'V         ')

, (N'507       ', N'103       ', N'Personal Berichte', N'UnderConstruction.aspx', N'V         ')
, (N'508       ', N'103       ', N'Lehrer Programme ', N'UnderConstruction.aspx', N'V         ')
, (N'509       ', N'103       ', N'Setup', N'UnderConstruction.aspx', N'V         ')
, (N'510       ', N'104       ', N'Équipe Info', N'Staff\\StaffInfo.aspx', N'V         ')
, (N'511       ', N'104       ', N'Ajouter un nouveau personnel', N'Staff\\AddStaff.aspx', N'V         ')
, (N'512       ', N'104       ', N'Préférences', N'UnderConstruction.aspx', N'V         ')
, (N'513       ', N'104       ', N'Rapports du personnel', N'UnderConstruction.aspx', N'V         ')
, (N'514       ', N'104       ', N'Programmes des enseignants', N'UnderConstruction.aspx', N'V         ')
, (N'515       ', N'104       ', N'Setup', N'UnderConstruction.aspx', N'V         ')
, (N'516       ', N'105       ', N'Персонал информация', N'Staff\\StaffInfo.aspx', N'V         ')
, (N'517       ', N'105       ', N'Добавить новый состав', N'Staff\\AddStaff.aspx', N'V         ')
, (N'518       ', N'105       ', N'Настройка', N'UnderConstruction.aspx', N'V         ')
, (N'519       ', N'105       ', N'Персонал отчеты', N'UnderConstruction.aspx', N'V         ')
, (N'520       ', N'105       ', N'Учителя программы ', N'UnderConstruction.aspx', N'V         ')
, (N'521       ', N'105       ', N'Установка ', N'UnderConstruction.aspx', N'V         ')
, (N'522       ', N'106       ', N'スタッフ情報', N'Staff\\StaffInfo.aspx', N'V         ')
, (N'523       ', N'106       ', N'新スタッフを追加', N'Staff\\AddStaff.aspx', N'V         ')
, (N'524       ', N'106       ', N'設定', N'UnderConstruction.aspx', N'V         ')
, (N'525       ', N'106       ', N'スタッフレポート', N'UnderConstruction.aspx', N'V         ')
, (N'526       ', N'106       ', N'教師プログラム ', N'UnderConstruction.aspx', N'V         ')
, (N'527       ', N'106       ', N'セットアップ ', N'UnderConstruction.aspx', N'V         ')
, (N'528       ', N'107       ', N'직원 소개', N'Staff\\StaffInfo.aspx', N'V         ')
, (N'529       ', N'107       ', N'신규 직원 추가', N'Staff\\AddStaff.aspx', N'V         ')
, (N'530       ', N'107       ', N'환경 설정', N'UnderConstruction.aspx', N'V         ')
, (N'531       ', N'107       ', N'직원 리포트', N'UnderConstruction.aspx', N'V         ')
, (N'532       ', N'107       ', N'교사 프\\그램 ', N'UnderConstruction.aspx', N'V         ')
, (N'533       ', N'107       ', N'설치 ', N'UnderConstruction.aspx', N'V         ')
, (N'534       ', N'108       ', N'Funcionários Info', N'Staff\\StaffInfo.aspx', N'V         ')
, (N'535       ', N'108       ', N'Adicionar novo Estatuto', N'Staff\\AddStaff.aspx', N'V         ')
, (N'536       ', N'108       ', N'Preferências', N'UnderConstruction.aspx', N'V         ')
, (N'537       ', N'108       ', N'Equipe Relatórios', N'UnderConstruction.aspx', N'V         ')
, (N'538       ', N'108       ', N'Programas de Professores', N'UnderConstruction.aspx', N'V         ')
, (N'539       ', N'108       ', N'Configuração ', N'UnderConstruction.aspx', N'V         ')
, (N'540       ', N'109       ', N'معلومات الموظفين', N'Staff\\StaffInfo.aspx', N'V         ')
, (N'541       ', N'109       ', N'إضافة جديدة للموظفين', N'Staff\\AddStaff.aspx', N'V         ')
, (N'542       ', N'109       ', N'التفضيلات', N'UnderConstruction.aspx', N'V         ')
, (N'543       ', N'109       ', N'تقارير الموظفين', N'UnderConstruction.aspx', N'V         ')
, (N'544       ', N'109       ', N'برامج  المعلم ', N'UnderConstruction.aspx', N'V         ')
, (N'545       ', N'109       ', N'الإعداد ', N'UnderConstruction.aspx', N'V         ')
, (N'546       ', N'110       ', N'员工信息', N'Staff\\StaffInfo.aspx', N'V         ')
, (N'547       ', N'110       ', N'添加新员工', N'Staff\\AddStaff.aspx', N'V         ')
, (N'548       ', N'110       ', N'偏好', N'UnderConstruction.aspx', N'V         ')
, (N'549       ', N'110       ', N'工\\人员的报告', N'UnderConstruction.aspx', N'V         ')
, (N'550       ', N'110       ', N'教师计划 ', N'UnderConstruction.aspx', N'V         ')
, (N'551       ', N'110       ', N'安装', N'UnderConstruction.aspx', N'V         ')

#ENGINE = INNODB;




 INSERT `Menu_Multilingual` (`Menu_id`, `Menu_Header`, `URL`, `Menu_Type`, `Language_Type`) VALUES (N'1         ', N'Inicio', N'Home.aspx', N'MM', N'es-MX')
,(N'2         ', N'Escuela de configuración', N'School\\SchoolDetails.aspx', N'MM', N'es-MX')
,(N'3         ', N'Estudiantes', N'UnderConstruction.aspx', N'MM', N'es-MX')
,(N'4         ', N'Usuarios', N'UnderConstruction.aspx', N'MM', N'es-MX')
,(N'5         ', N'Programación', N'UnderConstruction.aspx', N'MM', N'es-MX')
,(N'6         ', N'Grados', N'UnderConstruction.aspx', N'MM', N'es-MX')
,(N'7         ', N'Asistencia', N'UnderConstruction.aspx', N'MM', N'es-MX')
,(N'8         ', N'Elegibilidad', N'UnderConstruction.aspx', N'MM', N'es-MX')
,(N'9         ', N'Herramientas', N'UnderConstruction.aspx', N'MM', N'es-MX')
,(N'10        ', N'Prueba', N'UnderConstruction.aspx', N'MM', N'es-MX')
,(N'11        ', N'Casa', N'Home.aspx', N'MM', N'it-IT')
,(N'12        ', N'Scuola di installazione', N'School\\SchoolDetails.aspx', N'MM', N'it-IT')
,(N'13        ', N'Studenti', N'UnderConstruction.aspx', N'MM', N'it-IT')
,(N'14        ', N'Utenti', N'UnderConstruction.aspx', N'MM', N'it-IT')
,(N'15        ', N'Programmazione', N'UnderConstruction.aspx', N'MM', N'it-IT')
,(N'16        ', N'Gradi', N'UnderConstruction.aspx', N'MM', N'it-IT')
,(N'17        ', N'Presenze', N'UnderConstruction.aspx', N'MM', N'it-IT')
,(N'18        ', N'Ammissibilità', N'UnderConstruction.aspx', N'MM', N'it-IT')
,(N'19        ', N'Strumenti', N'UnderConstruction.aspx', N'MM', N'it-IT')
,(N'20        ', N'Verifica', N'UnderConstruction.aspx', N'MM', N'it-IT')
,(N'21        ', N'Heim', N'Home.aspx', N'MM', N'de-DE')
,(N'22        ', N'Schule Setup', N'School\\SchoolDetails.aspx', N'MM', N'de-DE')
,(N'23        ', N'Studierende', N'UnderConstruction.aspx', N'MM', N'de-DE')
,(N'24        ', N'Benutzer', N'UnderConstruction.aspx', N'MM', N'de-DE')
,(N'25        ', N'Ablaufplanung', N'UnderConstruction.aspx', N'MM', N'de-DE')
,(N'26        ', N'Note', N'UnderConstruction.aspx', N'MM', N'de-DE')
,(N'27        ', N'Attendance', N'UnderConstruction.aspx', N'MM', N'de-DE')
,(N'28        ', N'Förderfähigkeit', N'UnderConstruction.aspx', N'MM', N'de-DE')
,(N'29        ', N'Werkzeuge', N'UnderConstruction.aspx', N'MM', N'de-DE')
,(N'30        ', N'Test', N'UnderConstruction.aspx', N'MM', N'de-DE')
,(N'31        ', N'Home', N'Home.aspx', N'MM', N'fr-FR')
,(N'32        ', N'École d''installation', N'School\\SchoolDetails.aspx', N'MM', N'fr-FR')
,(N'33        ', N'Etudiants', N'UnderConstruction.aspx', N'MM', N'fr-FR')
,(N'34        ', N'Utilisateurs', N'UnderConstruction.aspx', N'MM', N'fr-FR')
,(N'35        ', N'Scheduling', N'UnderConstruction.aspx', N'MM', N'fr-FR')
,(N'36        ', N'Grades', N'UnderConstruction.aspx', N'MM', N'fr-FR')
,(N'37        ', N'Fréquentation', N'UnderConstruction.aspx', N'MM', N'fr-FR')
,(N'38        ', N'Conditions d''admissibilité', N'UnderConstruction.aspx', N'MM', N'fr-FR')
,(N'39        ', N'Outils', N'UnderConstruction.aspx', N'MM', N'fr-FR')
,(N'40        ', N'épreuve', N'UnderConstruction.aspx', N'MM', N'fr-FR')
,(N'41        ', N'Дом', N'Home.aspx', N'MM', N'ru-RU')
,(N'42        ', N'Школа Настройка', N'School\\SchoolDetails.aspx', N'MM', N'ru-RU')
,(N'43        ', N'Студенты', N'UnderConstruction.aspx', N'MM', N'ru-RU')
,(N'44        ', N'Пользователи', N'UnderConstruction.aspx', N'MM', N'ru-RU')
,(N'45        ', N'Планирование', N'UnderConstruction.aspx', N'MM', N'ru-RU')
,(N'46        ', N'Оценки', N'UnderConstruction.aspx', N'MM', N'ru-RU')
,(N'47        ', N'Посещаемость', N'UnderConstruction.aspx', N'MM', N'ru-RU')
,(N'48        ', N'право на избрание', N'UnderConstruction.aspx', N'MM', N'ru-RU')
,(N'49        ', N'Инструменты', N'UnderConstruction.aspx', N'MM', N'ru-RU')
,(N'50        ', N'Проверка', N'UnderConstruction.aspx', N'MM', N'ru-RU')
,(N'51        ', N'家庭', N'Home.aspx', N'MM', N'ja-JP')
,(N'52        ', N'学校のセットアップ', N'School\\SchoolDetails.aspx', N'MM', N'ja-JP')
,(N'53        ', N'学生', N'UnderConstruction.aspx', N'MM', N'ja-JP')
,(N'54        ', N'ユーザ', N'UnderConstruction.aspx', N'MM', N'ja-JP')
,(N'55        ', N'スケジュール設定', N'UnderConstruction.aspx', N'MM', N'ja-JP')
,(N'56        ', N'等級', N'UnderConstruction.aspx', N'MM', N'ja-JP')
,(N'57        ', N'出席', N'UnderConstruction.aspx', N'MM', N'ja-JP')
,(N'58        ', N'在留資格', N'UnderConstruction.aspx', N'MM', N'ja-JP')
,(N'59        ', N'道具', N'UnderConstruction.aspx', N'MM', N'ja-JP')
,(N'60        ', N'試験', N'UnderConstruction.aspx', N'MM', N'ja-JP')
,(N'71        ', N'집', N'Home.aspx', N'MM', N'ko-KR')
,(N'72        ', N'학교 설치', N'School\\SchoolDetails.aspx', N'MM', N'ko-KR')
,(N'73        ', N'학생', N'UnderConstruction.aspx', N'MM', N'ko-KR')
,(N'74        ', N'사용자', N'UnderConstruction.aspx', N'MM', N'ko-KR')
,(N'75        ', N'일정', N'UnderConstruction.aspx', N'MM', N'ko-KR')
,(N'76        ', N'학년', N'UnderConstruction.aspx', N'MM', N'ko-KR')
,(N'77        ', N'출석', N'UnderConstruction.aspx', N'MM', N'ko-KR')
,(N'78        ', N'적임', N'UnderConstruction.aspx', N'MM', N'ko-KR')
,(N'79        ', N'도구', N'UnderConstruction.aspx', N'MM', N'ko-KR')
,(N'80        ', N'시험', N'UnderConstruction.aspx', N'MM', N'ko-KR')
,(N'61        ', N'Início', N'Home.aspx', N'MM', N'pt-BR')
,(N'62        ', N'Escola Instalação', N'School\\SchoolDetails.aspx', N'MM', N'pt-BR')
,(N'63        ', N'Estudantes', N'UnderConstruction.aspx', N'MM', N'pt-BR')
,(N'64        ', N'Usuários', N'UnderConstruction.aspx', N'MM', N'pt-BR')
,(N'65        ', N'Agendamento', N'UnderConstruction.aspx', N'MM', N'pt-BR')
,(N'66        ', N'Graus', N'UnderConstruction.aspx', N'MM', N'pt-BR')
,(N'67        ', N'Presenças', N'UnderConstruction.aspx', N'MM', N'pt-BR')
,(N'68        ', N'Elegibilidade', N'UnderConstruction.aspx', N'MM', N'pt-BR')
,(N'69        ', N'Ferramentas', N'UnderConstruction.aspx', N'MM', N'pt-BR')
,(N'70        ', N'Teste', N'UnderConstruction.aspx', N'MM', N'pt-BR')
,(N'81        ', N'منزل', N'Home.aspx', N'MM', N'ar-SA')
,(N'82        ', N'مدرسة الإعداد', N'School\\SchoolDetails.aspx', N'MM', N'ar-SA')
,(N'83        ', N'طلاب', N'UnderConstruction.aspx', N'MM', N'ar-SA')
,(N'84        ', N'المستخدمين', N'UnderConstruction.aspx', N'MM', N'ar-SA')
,(N'85        ', N'جدولة', N'UnderConstruction.aspx', N'MM', N'ar-SA')
,(N'86        ', N'الصف', N'UnderConstruction.aspx', N'MM', N'ar-SA')
,(N'87        ', N'الحضور', N'UnderConstruction.aspx', N'MM', N'ar-SA')
,(N'88        ', N'جدارة للانتخاب', N'UnderConstruction.aspx', N'MM', N'ar-SA')
,(N'89        ', N'أدوات', N'UnderConstruction.aspx', N'MM', N'ar-SA')
,(N'90        ', N'اختبار', N'UnderConstruction.aspx', N'MM', N'ar-SA')
,(N'91        ', N'家', N'Home.aspx', N'MM', N'zh-CN')
,(N'92        ', N'安装学校', N'School\\SchoolDetails.aspx', N'MM', N'zh-CN')
,(N'93        ', N'学员', N'UnderConstruction.aspx', N'MM', N'zh-CN')
,(N'94        ', N'用户', N'UnderConstruction.aspx', N'MM', N'zh-CN')
,(N'95        ', N'调度', N'UnderConstruction.aspx', N'MM', N'zh-CN')
,(N'96        ', N'牌号', N'UnderConstruction.aspx', N'MM', N'zh-CN')
,(N'97        ', N'参', N'UnderConstruction.aspx', N'MM', N'zh-CN')
,(N'98        ', N'资格', N'UnderConstruction.aspx', N'MM', N'zh-CN')
,(N'99        ', N'工具', N'UnderConstruction.aspx', N'MM', N'zh-CN')
,(N'100       ', N'测试', N'UnderConstruction.aspx', N'MM', N'zh-CN')
,(N'101       ', N'Gestión de Personal', N'UnderConstruction.aspx', N'MM', N'es-MX')

,(N'102       ', N'Gestione del personale', N'UnderConstruction.aspx', N'MM', N'it-IT')
,(N'103       ', N'Mitarbeiterführung', N'UnderConstruction.aspx', N'MM', N'de-DE')
,(N'104       ', N'De gestion du personnel', N'UnderConstruction.aspx', N'MM', N'fr-FR')
,(N'105       ', N'Персонал Управление', N'UnderConstruction.aspx', N'MM', N'ru-RU')
,(N'106       ', N'スタッフ管理', N'UnderConstruction.aspx', N'MM', N'ja-JP')
,(N'107       ', N'직원 관리', N'UnderConstruction.aspx', N'MM', N'ko-KR')
,(N'108       ', N'Gestão de Pessoal', N'UnderConstruction.aspx', N'MM', N'pt-BR')
,(N'109       ', N'إدارة الموظفين', N'UnderConstruction.aspx', N'MM', N'ar-SA')
,(N'110       ', N'员工管理', N'UnderConstruction.aspx', N'MM', N'zh-CN')



#ENGINE = INNODB;


INSERT INTO `staff_type`(`stf_type_id`, `stf_type_cd`, `stf_type_short_nm`, `stf_type_name`, `last_updated`, `Language_Type`)
VALUES (1, '1', 'TCH', 'Teacher', NULL, 'en-US'),
(2, '2', 'AD', 'Administrator', NULL, 'en-US'),
(3, '3', 'NTS', 'Non teaching staff', NULL, 'en-US'),
 (4, '4', 'CUS', 'Custodian', NULL, 'en-US'),
 (5, '5', 'PR', 'Principal', NULL, 'en-US'),
 (6, '6', 'CLK', 'Clerk', NULL, 'en-US');


#ENGINE = INNODB;





INSERT INTO `look_up_data`(`IID`, `TYPE`, `NAME`, `ISO_CODE`)
VALUES (1, 1, 'United States', 'US'),
  (2, 1, 'Afghanistan', 'AF'),
  (3, 1, 'Albania', 'AL'),
  (4, 1, 'Algeria', 'DZ'),
  (5, 1, 'American Samoa', 'AS'),
  (6, 1, 'Andorra', 'AD'),
  (7, 1, 'Angola', 'AO'),
  (8, 1, 'Anguilla', 'AI'),
  (9, 1, 'Antarctica', 'AQ'),
  (10, 1, 'Antigua & Barbuda', 'AG'),
  (11, 1, 'Antilles, Netherlands', ''),
  (12, 1, 'Arabia, Saudi', 'SA'),
  (13, 1, 'Argentina', 'AR'),
  (14, 1, 'Armenia', 'AM'),
  (15, 1, 'Aruba', 'AW'),
  (16, 1, 'Australia', 'AU'),
  (17, 1, 'Austria', 'AT'),
  (18, 1, 'Azerbaijan', 'AZ'),
  (19, 1, 'Bahamas, The', 'BS'),
  (20, 1, 'Bahrain', 'BH'),
  (21, 1, 'Bangladesh', 'BD'),
  (22, 1, 'Barbados', 'BB'),
  (23, 1, 'Belarus', 'BY'),
  (24, 1, 'Belgium', 'BE'),
  (25, 1, 'Belize', 'BZ'),
  (26, 1, 'Benin', 'BJ'),
  (27, 1, 'Bermuda', 'BM'),
  (28, 1, 'Bhutan', 'BT'),
  (29, 1, 'Bolivia', 'BO'),
  (30, 1, 'Bosnia and Herzegovina', 'BA'),
  (31, 1, 'Botswana', 'BW'),
  (32, 1, 'Bouvet Island', 'BV'),
  (33, 1, 'Brazil', 'BR'),
  (34, 1, 'British Indian Ocean Territory', 'IO'),
  (35, 1, 'British Virgin Islands', 'VG'),
  (36, 1, 'Brunei Darussalam', 'BN'),
  (37, 1, 'Bulgaria', 'BG'),
  (38, 1, 'Burkina Faso', 'BF'),
  (39, 1, 'Burundi', 'BI'),
  (40, 1, 'Cambodia', 'KH'),
  (41, 1, 'Cameroon', 'CM'),
  (42, 1, 'Canada', 'CA'),
  (43, 1, 'Cape Verde', 'CV'),
  (44, 1, 'Cayman Islands', 'KY'),
  (45, 1, 'Central African Republic', 'CF'),
  (46, 1, 'Chad', 'TD'),
  (47, 1, 'Chile', 'CL'),
  (48, 1, 'China', 'CN'),
  (49, 1, 'Christmas Island', 'CX'),
  (50, 1, 'Cocos (Keeling) Islands', 'CC'),
  (51, 1, 'Colombia', 'CO'),
  (52, 1, 'Comoros', 'KM'),
  (53, 1, 'Congo', 'CG'),
  (54, 1, 'Congo,Democratic Rep. of the ', 'CD'),
  (55, 1, 'Cook Islands', 'CK'),
  (56, 1, 'Costa Rica', 'CR'),
  (57, 1, 'Cote D\'Ivoire', 'CI'),
  (58, 1, 'Croatia', 'HR'),
  (59, 1, 'Cuba', 'CU'),
  (60, 1, 'Cyprus', 'CY'),
  (61, 1, 'Czech Republic', 'CZ'),
  (62, 1, 'Czechoslovakia (Former)', ''),
  (63, 1, 'Denmark', 'DK'),
  (64, 1, 'Djibouti', 'DJ'),
  (65, 1, 'Dominica', 'DM'),
  (66, 1, 'Dominican Republic', 'DO'),
  (67, 1, 'East Timor (Timor-Leste)', 'TL'),
  (68, 1, 'Ecuador', 'EC'),
  (69, 1, 'Egypt', 'EG'),
  (70, 1, 'El Salvador', 'SV'),
  (71, 1, 'Equatorial Guinea', 'GQ'),
  (72, 1, 'Eritrea', 'ER'),
  (73, 1, 'Estonia', 'EE'),
  (74, 1, 'Ethiopia', 'ET'),
  (75, 1, 'European Union', ''),
  (76, 1, 'Falkland Islands (Malvinas)', 'FK'),
  (77, 1, 'Faroe Islands', 'FO'),
  (78, 1, 'Fiji', 'FJ'),
  (79, 1, 'Finland', 'FI'),
  (80, 1, 'France', 'FR'),
  (81, 1, 'French Guiana', 'GF'),
  (82, 1, 'French Polynesia', 'PF'),
  (83, 1, 'French Southern Territories - TF', 'TF'),
  (84, 1, 'Gabon', 'GA'),
  (85, 1, 'Gambia, the', 'GM'),
  (86, 1, 'Georgia', 'GE'),
  (87, 1, 'Germany', 'DE'),
  (88, 1, 'Ghana', 'GH'),
  (89, 1, 'Gibraltar', 'GI'),
  (90, 1, 'Greece', 'GR'),
  (91, 1, 'Greenland', 'GL'),
  (92, 1, 'Grenada', 'GD'),
  (93, 1, 'Guadeloupe', 'GP'),
  (94, 1, 'Guam', 'GU'),
  (95, 1, 'Guatemala', 'GT'),
  (96, 1, 'Guernsey', 'GG'),
  (97, 1, 'Guyana, French', 'GF'),
  (98, 1, 'Guinea', 'GN'),
  (99, 1, 'Guinea, Equatorial', 'GQ'),
  (100, 1, 'Guinea-Bissau', 'GW'),
  (101, 1, 'Guyana', 'GY'),
  (102, 1, 'Haiti', 'HT'),
  (103, 1, 'Heard and McDonald Islands', 'HM'),
  (104, 1, 'Holland (see Netherlands)', 'NL'),
  (105, 1, 'Holy See (Vatican City State)', 'VA'),
  (106, 1, 'Honduras', 'HN'),
  (107, 1, 'Hong Kong, (China)', 'HK'),
  (108, 1, 'Hungary', 'HU'),
  (109, 1, 'Iceland', 'IS'),
  (110, 1, 'India', 'IN'),
  (111, 1, 'Indonesia', 'ID'),
  (112, 1, 'Iran, Islamic Republic of', 'IR'),
  (113, 1, 'Iraq', 'IQ'),
  (114, 1, 'Ireland', 'IE'),
  (115, 1, 'Israel', 'IL'),
  (116, 1, 'Italy', 'IT'),
  (117, 1, 'Ivory Coast (see Cote d\'Ivoire)', 'CI'),
  (118, 1, 'Jamaica', 'JM'),
  (119, 1, 'Japan', 'JP'),
  (120, 1, 'Jersey', 'JE'),
  (121, 1, 'Jordan', 'JO'),
  (122, 1, 'Kazakhstan', 'KZ'),
  (123, 1, 'Kenya', 'KE'),
  (124, 1, 'Kiribati', 'KI'),
  (125, 1, 'Korea, (South) Republic of', 'KR'),
  (126, 1, 'Korea, Demo. People\'s Rep. of', 'KP'),
  (127, 1, 'Kuwait', 'KW'),
  (128, 1, 'Kyrgyzstan', 'KG'),
  (129, 1, 'Lao People\'s Democratic Republic', 'LA'),
  (130, 1, 'Latvia', 'LV'),
  (131, 1, 'Lebanon', 'LB'),
  (132, 1, 'Lesotho', 'LS'),
  (133, 1, 'Liberia', 'LR'),
  (134, 1, 'Libyan Arab Jamahiriya', 'LY'),
  (135, 1, 'Liechtenstein', 'LI'),
  (136, 1, 'Lithuania', 'LT'),
  (137, 1, 'Luxembourg', 'LU'),
  (138, 1, 'Macao, (China)', 'MO'),
  (139, 1, 'Macedonia, TFYR', 'MK'),
  (140, 1, 'Madagascar', 'MG'),
  (141, 1, 'Malawi', 'MW'),
  (142, 1, 'Malaysia', 'MY'),
  (143, 1, 'Maldives', 'MV'),
  (144, 1, 'Mali', 'ML'),
  (145, 1, 'Malta', 'MT'),
  (146, 1, 'Marshall Islands', 'MH'),
  (147, 1, 'Martinique', 'MQ'),
  (148, 1, 'Mauritania', 'MR'),
  (149, 1, 'Mauritius', 'MU'),
  (150, 1, 'Mayotte', 'YT'),
  (151, 1, 'Mexico', 'MX'),
  (152, 1, 'Micronesia, Federated States of', 'FM'),
  (153, 1, 'Moldova, Republic of', 'MD'),
  (154, 1, 'Monaco', 'MC'),
  (155, 1, 'Mongolia', 'MN'),
  (156, 1, 'Montserrat', 'MS'),
  (157, 1, 'Morocco', 'MA'),
  (158, 1, 'Mozambique', 'MZ'),
  (159, 1, 'Myanmar (ex-Burma)', 'MM'),
  (160, 1, 'Namibia', 'NA'),
  (161, 1, 'Nauru', 'NR'),
  (162, 1, 'Nepal', 'NP'),
  (163, 1, 'Netherlands', 'NL'),
  (164, 1, 'Netherlands Antilles', 'AN'),
  (165, 1, 'New Caledonia', 'NC'),
  (166, 1, 'New Zealand', 'NZ'),
  (167, 1, 'Nicaragua', 'NI'),
  (168, 1, 'Niger', 'NE'),
  (169, 1, 'Nigeria', 'NG'),
  (170, 1, 'Niue', 'NU'),
  (171, 1, 'Norfolk Island', 'NF'),
  (172, 1, 'Northern Mariana Islands', 'MP'),
  (173, 1, 'Norway', 'NO'),
  (174, 1, 'Oman', 'OM'),
  (175, 1, 'Pakistan', 'PK'),
  (176, 1, 'Palau', 'PW'),
  (177, 1, 'Palestinian Territory', 'PS'),
  (178, 1, 'Panama', 'PA'),
  (179, 1, 'Papua New Guinea', 'PG'),
  (180, 1, 'Paraguay', 'PY'),
  (181, 1, 'Peru', 'PE'),
  (182, 1, 'Philippines', 'PH'),
  (183, 1, 'Pitcairn Island', 'PN'),
  (184, 1, 'Poland', 'PL'),
  (185, 1, 'Portugal', 'PT'),
  (186, 1, 'Puerto Rico', 'PR'),
  (187, 1, 'Qatar', 'QA'),
  (188, 1, 'Reunion', 'RE'),
  (189, 1, 'Romania', 'RO'),
  (190, 1, 'Russia (Russian Federation)', 'RU'),
  (191, 1, 'Rwanda', 'RW'),
  (192, 1, 'S. Georgia and S. Sandwich Is.', 'GS'),
  (193, 1, 'Sahara', ''),
  (194, 1, 'Saint Helena', 'SH'),
  (195, 1, 'Saint Kitts and Nevis', 'KN'),
  (196, 1, 'Saint Lucia', 'LC'),
  (197, 1, 'Saint Pierre and Miquelon', 'PM'),
  (198, 1, 'Saint Vincent and the Grenadines', 'VC'),
  (199, 1, 'Samoa', 'WS'),
  (200, 1, 'San Marino', 'SM'),
  (201, 1, 'Sao Tome and Principe', 'ST'),
  (202, 1, 'Saudi Arabia', 'SA'),
  (203, 1, 'Senegal', 'SN'),
  (204, 1, 'Serbia & Montenegro', 'RS'),
  (205, 1, 'Seychelles', 'SC'),
  (206, 1, 'Sierra Leone', 'SL'),
  (207, 1, 'Singapore', 'SG'),
  (208, 1, 'Slovakia', 'SK'),
  (209, 1, 'Slovenia', 'SI'),
  (210, 1, 'Solomon Islands', 'SB'),
  (211, 1, 'Somalia', 'SO'),
  (212, 1, 'South Africa', 'ZA'),
  (213, 1, 'Spain', 'ES'),
  (214, 1, 'Sri Lanka (ex-Ceilan)', 'LK'),
  (215, 1, 'Sudan', 'SD'),
  (216, 1, 'Suriname', 'SR'),
  (217, 1, 'Svalbard and Jan Mayen Islands', 'SJ'),
  (218, 1, 'Swaziland', 'SZ'),
  (219, 1, 'Sweden', 'SE'),
  (220, 1, 'Switzerland', 'CH'),
  (221, 1, 'Syrian Arab Republic', 'SY'),
  (222, 1, 'Taiwan', 'TW'),
  (223, 1, 'Tajikistan', 'TJ'),
  (224, 1, 'Tanzania, United Republic of', 'TZ'),
  (225, 1, 'Thailand', 'TH'),
  (226, 1, 'Timor-Leste (East Timor)', 'TL'),
  (227, 1, 'Togo', 'TG'),
  (228, 1, 'Tokelau', 'TK'),
  (229, 1, 'Tonga', 'TO'),
  (230, 1, 'Trinidad & Tobago', 'TT'),
  (231, 1, 'Tunisia', 'TN'),
  (232, 1, 'Turkey', 'TR'),
  (233, 1, 'Turkmenistan', 'TM'),
  (234, 1, 'Turks and Caicos Islands', 'TC'),
  (235, 1, 'Tuvalu', 'TV'),
  (236, 1, 'Uganda', 'UG'),
  (237, 1, 'Ukraine', 'UA'),
  (238, 1, 'United Arab Emirates', 'AE'),
  (239, 1, 'United Kingdom', 'GB'),
  (240, 1, 'Uruguay', 'UY'),
  (241, 1, 'US Minor Outlying Islands', 'UM'),
  (242, 1, 'Uzbekistan', 'UZ'),
  (243, 1, 'Vanuatu', 'VU'),
  (244, 1, 'Vatican City State (Holy See)', ''),
  (245, 1, 'Venezuela', 'VE'),
  (246, 1, 'Viet Nam', 'VN'),
  (247, 1, 'Virgin Islands, British', 'VG'),
  (248, 1, 'Virgin Islands, U.S.', 'VI'),
  (249, 1, 'Wallis and Futuna', 'WF'),
  (250, 1, 'Western Sahara', 'EH'),
  (251, 1, 'Yemen', 'YE'),
  (252, 1, 'Zambia', 'ZM'),
  (253, 1, 'Zimbabwe', 'ZW'),
  (254, 2, 'Other (Non U.S.)', ''),
  (255, 2, 'Alabama', 'AL'),
  (256, 2, 'Alaska', 'AK'),
  (257, 2, 'Arizona', 'AZ'),
  (258, 2, 'Arkansas', 'AR'),
  (259, 2, 'California', 'CA'),
  (260, 2, 'Colorado', 'CO'),
  (261, 2, 'Connecticut', 'CT'),
  (262, 2, 'Delaware', 'DE'),
  (263, 2, 'Florida', 'FL'),
  (264, 2, 'Georgia', 'GA'),
  (265, 2, 'Hawaii', 'HI'),
  (266, 2, 'Idaho', 'ID'),
  (267, 2, 'Illinois', 'IL'),
  (268, 2, 'Indiana', 'IN'),
  (269, 2, 'Iowa', 'IA'),
  (270, 2, 'Kansas', 'KS'),
  (271, 2, 'Kentucky', 'KY'),
  (272, 2, 'Louisiana', 'LA'),
  (273, 2, 'Maine', 'ME'),
  (274, 2, 'Maryland', 'MD'),
  (275, 2, 'Massachusetts', 'MA'),
  (276, 2, 'Michigan', 'MI'),
  (277, 2, 'Minnesota', 'MN'),
  (278, 2, 'Mississippi', 'MS'),
  (279, 2, 'Missouri', 'MO'),
  (280, 2, 'Montana', 'MT'),
  (281, 2, 'Nebraska', 'NE'),
  (282, 2, 'Nevada', 'NV'),
  (283, 2, 'New Hampshire', 'NH'),
  (284, 2, 'New Jersey', 'NJ'),
  (285, 2, 'New Mexico', 'NM'),
  (286, 2, 'New York', 'NY'),
  (287, 2, 'North Carolina', 'NC'),
  (288, 2, 'North Dakota', 'ND'),
  (289, 2, 'Ohio', 'OH'),
  (290, 2, 'Oklahoma', 'OK'),
  (291, 2, 'Oregon', 'OR'),
  (292, 2, 'Pennsylvania', 'PA'),
  (293, 2, 'Rhode Island', 'RI'),
  (294, 2, 'South Carolina', 'SC'),
  (295, 2, 'South Dakota', 'SD'),
  (296, 2, 'Tennessee', 'TN'),
  (297, 2, 'Texas', 'TX'),
  (298, 2, 'Utah', 'UT'),
  (299, 2, 'Vermont', 'VT'),
  (300, 2, 'Virginia', 'VA'),
  (301, 2, 'Washington', 'WA'),
  (302, 2, 'West Virginia', 'WV'),
  (303, 2, 'Wisconsin', 'WI'),
  (304, 2, 'Wyoming', 'WY'),
  (305, 3, 'Appling County', ''),
  (306, 3, 'Athens-Clarke County', ''),
  (307, 3, 'Atkinson County', ''),
  (308, 3, 'Augusta-Richmond County', ''),
  (309, 3, 'Bacon County', ''),
  (310, 3, 'Baker County', ''),
  (311, 3, 'Baldwin County', ''),
  (312, 3, 'Banks County', ''),
  (313, 3, 'Barrow County', ''),
  (314, 3, 'Bartow County', ''),
  (315, 3, 'Ben Hill County', ''),
  (316, 3, 'Berrien County', ''),
  (317, 3, 'Bibb County', ''),
  (318, 3, 'Bleckley County', ''),
  (319, 3, 'Brantley County', ''),
  (320, 3, 'Brooks County', ''),
  (321, 3, 'Bryan County', ''),
  (322, 3, 'Bulloch County', ''),
  (323, 3, 'Burke County', ''),
  (324, 3, 'Butts County', ''),
  (325, 3, 'Calhoun County', ''),
  (326, 3, 'Camden County', ''),
  (327, 3, 'Candler County', ''),
  (328, 3, 'Carroll County', ''),
  (329, 3, 'Catoosa County', ''),
  (330, 3, 'Charlton County', ''),
  (331, 3, 'Chatham County', ''),
  (332, 3, 'Chattahoochee County', ''),
  (333, 3, 'Chattooga County', ''),
  (334, 3, 'Cherokee County', ''),
  (335, 3, 'Clarke County', ''),
  (336, 3, 'Clay County', ''),
  (337, 3, 'Clayton County', ''),
  (338, 3, 'Clinch County', ''),
  (339, 3, 'Cobb County', ''),
  (340, 3, 'Coffee County', ''),
  (341, 3, 'Colquitt County', ''),
  (342, 3, 'Columbia County', ''),
  (343, 3, 'Columbus-Muscogee County', ''),
  (344, 3, 'Cook County', ''),
  (345, 3, 'Coweta County', ''),
  (346, 3, 'Crawford County', ''),
  (347, 3, 'Crisp County', ''),
  (348, 3, 'Dade County', ''),
  (349, 3, 'Dawson County', ''),
  (350, 3, 'DeKalb County', ''),
  (351, 3, 'Decatur County', ''),
  (352, 3, 'Dodge County', ''),
  (353, 3, 'Dooly County', ''),
  (354, 3, 'Dougherty County', ''),
  (355, 3, 'Douglas County', ''),
  (356, 3, 'Early County', ''),
  (357, 3, 'Echols County', ''),
  (358, 3, 'Effingham County', ''),
  (359, 3, 'Elbert County', ''),
  (360, 3, 'Emanuel County', ''),
  (361, 3, 'Evans County', ''),
  (362, 3, 'Fannin County', ''),
  (363, 3, 'Fayette County', ''),
  (364, 3, 'Floyd County', ''),
  (365, 3, 'Forsyth County', ''),
  (366, 3, 'Franklin County ', ''),
  (367, 3, 'Fulton County', ''),
  (368, 3, 'Gilmer County', ''),
  (369, 3, 'Glascock County', ''),
  (370, 3, 'Glynn County', ''),
  (371, 3, 'Gordon County', ''),
  (372, 3, 'Grady County', ''),
  (373, 3, 'Greene County', ''),
  (374, 3, 'Gwinnett County', ''),
  (375, 3, 'Habersham County', ''),
  (376, 3, 'Hall County', ''),
  (377, 3, 'Hancock County', ''),
  (378, 3, 'Haralson County', ''),
  (379, 3, 'Harris County', ''),
  (380, 3, 'Hart County', ''),
  (381, 3, 'Heard County', ''),
  (382, 3, 'Henry County', ''),
  (383, 3, 'Houston County', ''),
  (384, 3, 'Irwin County', ''),
  (385, 3, 'Jackson County', ''),
  (386, 3, 'Jasper County', ''),
  (387, 3, 'Jeff Davis County', ''),
  (388, 3, 'Jefferson County', ''),
  (389, 3, 'Jenkins County', ''),
  (390, 3, 'Johnson County', ''),
  (391, 3, 'Jones County', ''),
  (392, 3, 'Lamar County', ''),
  (393, 3, 'Lanier County', ''),
  (394, 3, 'Laurens County', ''),
  (395, 3, 'Lee County', ''),
  (396, 3, 'Liberty County', ''),
  (397, 3, 'Lincoln County', ''),
  (398, 3, 'Long County', ''),
  (399, 3, 'Lowndes County', ''),
  (400, 3, 'Lumpkin County', ''),
  (401, 3, 'Macon County', ''),
  (402, 3, 'Madison County', ''),
  (403, 3, 'Marion County', ''),
  (404, 3, 'McDuffie County', ''),
  (405, 3, 'McIntosh County', ''),
  (406, 3, 'Meriwether County', ''),
  (407, 3, 'Miller County', ''),
  (408, 3, 'Mitchell County', ''),
  (409, 3, 'Monroe County', ''),
  (410, 3, 'Montgomery County', ''),
  (411, 3, 'Morgan County', ''),
  (412, 3, 'Murray County', ''),
  (413, 3, 'Muscogee County', ''),
  (414, 3, 'Newton County', ''),
  (415, 3, 'Oconee County', ''),
  (416, 3, 'Oglethorpe County', ''),
  (417, 3, 'Paulding County', ''),
  (418, 3, 'Peach County', ''),
  (419, 3, 'Pickens County', ''),
  (420, 3, 'Pierce County', ''),
  (421, 3, 'Pike County', ''),
  (422, 3, 'Polk County', ''),
  (423, 3, 'Pulaski County', ''),
  (424, 3, 'Putnam County', ''),
  (425, 3, 'Quitman County', ''),
  (426, 3, 'Rabun County', ''),
  (427, 3, 'Randolph County', ''),
  (428, 3, 'Richmond County', ''),
  (429, 3, 'Rockdale County', ''),
  (430, 3, 'Schley County', ''),
  (431, 3, 'Screven County', ''),
  (432, 3, 'Seminole County', ''),
  (433, 3, 'Spalding County', ''),
  (434, 3, 'Stephens County', ''),
  (435, 3, 'Stewart County', ''),
  (436, 3, 'Sumter County', ''),
  (437, 3, 'Talbot County', ''),
  (438, 3, 'Taliaferro County', ''),
  (439, 3, 'Tattnall County', ''),
  (440, 3, 'Taylor County', ''),
  (441, 3, 'Telfair County', ''),
  (442, 3, 'Terrell County', ''),
  (443, 3, 'Thomas County', ''),
  (444, 3, 'Tift County', ''),
  (445, 3, 'Toombs County', ''),
  (446, 3, 'Towns County', ''),
  (447, 3, 'Treutlen County', ''),
  (448, 3, 'Troup County',''),
  (449, 3, 'Turner County', ''),
  (450, 3, 'Twiggs County', ''),
  (451, 3, 'Union County', ''),
  (452, 3, 'Upson County', ''),
  (453, 3, 'Walker County', ''),
  (454, 3, 'Walton County', ''),
  (455, 3, 'Ware County', ''),
  (456, 3, 'Warren County', ''),
  (457, 3, 'Washington County', ''),
  (458, 3, 'Wayne County', ''),
  (459, 3, 'Webster County', ''),
  (460, 3, 'Wheeler County', ''),
  (461, 3, 'White County', ''),
  (462, 3, 'Whitfield County', '');


#ENGINE = INNODB;

INSERT INTO `ethnicity`(`eth_id`, `eth_cd`, `eth_nm`, `last_updated`)
VALUES (1, 'wh', 'White,Non-Hispanic', NULL,'A',1, NULL),
  (2, 'bl', 'Black,Non-Hispanic', NULL,'A',2, NULL),
  (3, 'Am', 'Amer,Indian or Alaskan', NULL,'A',3, NULL),
  (4, 'As', 'Asian or Pacific Islander', NULL,'A',4, NULL),
  (5, 'Hs', 'Hispanic', NULL,'A',5, NULL),
  (6, 'Haw', 'Hawaiian', NULL,'A',6, NULL),
 (7, 'Oth', 'Others', NULL,'A',7, NULL) ; 




#ENGINE = INNODB;



INSERT INTO `year_type`(`years_type_id`, `year_type_cd`, `year_type_nm`, `last_updated`)
VALUES (1, 'Y', 'Year', '2009-05-18 00:00:00'),
  (2, 'S', 'Semister', '2009-05-18 00:00:00'),
  (3, 'Q', 'Quarter', '2009-05-18 00:00:00'),
  (4, 'P', 'Progress Period', '2009-05-18 00:00:00');




#ENGINE = INNODB;



INSERT `Main_Menu` (`Main_Menu_ID`, `Main_Menu_Header`, `Url`) VALUES (1, N'Home', N'Home.aspx')
,(2, N'School Setup', N'School\\SchoolDetails.aspx')
,(3, N'Students', N'UnderConstruction.aspx')
,(4, N'Users', N'UnderConstruction.aspx')
,(5, N'Scheduling', N'UnderConstruction.aspx')
,(6, N'Grades', N'UnderConstruction.aspx')
,(7, N'Attendance', N'UnderConstruction.aspx')
,(8, N'Eligibility', N'UnderConstruction.aspx')
,(9, N'Tools ', N'UnderConstruction.aspx')
,(11, N'Staff Management', N'UnderConstruction.aspx')


#ENGINE = INNODB;


INSERT INTO gender (gender_id, gender_cd, gender_nm, last_updated) VALUES (1, 'M', 'Male', NULL)
,  (2, 'F', 'Female', NULL)

#ENGINE = INNODB;


INSERT language (language_id, language_cd, language_nm, last_updated) VALUES (1, 'e', 'English', NULL)
, (2, 'esp', 'Spanish', NULL)
, (3, 'chi', 'Chinese', NULL)
, (4, 'jap', 'Japanese', NULL)
, (5, 'ge', 'German', NULL)
, (6, 'ko', 'Korean', NULL)
, (7, 'fr', 'French', NULL)
, (8, 'it', 'Italian', NULL)
, (9, 'ru', 'Russian', NULL)
, (10, 'por', 'Portuguese', NULL)

#ENGINE = INNODB;


INSERT SubMenu_Child_Multilingual (SubMenu_Child_Id, SubMenu_Id, SubMenu_Child_Header, URL, Visible) VALUES (N'1         ', N'15        ', N'Estudiante campo', N'#', N'V         ')
, (N'2         ', N'15        ', N'Formulario de entrada de datos para los estudiantes', N'#', N'V         ')
, (N'3         ', N'63        ', N'学生フィールド', N'#', N'V         ')
, (N'4         ', N'63        ', N'学生のデータ入力フォーム', N'#', N'V         ')
, (N'5         ', N'111       ', N'Studente CAMPO', N'#', N'V         ')
, (N'6         ', N'111       ', N'Studenti modulo di inserimento dati', N'#', N'V         ')
, (N'7         ', N'159       ', N'Student Felder', N'#', N'V         ')
, (N'8         ', N'159       ', N'Student Daten Eintrag Form', N'#', N'V         ')
, (N'15        ', N'399       ', N'학생 필즈', N'#', N'V         ')
, (N'16        ', N'399       ', N'학생들은 데이터 입력 양식', N'#', N'V         ')
, (N'15        ', N'447       ', N'学生田', N'#', N'V         ')
, (N'16        ', N'447       ', N'学生数据录入表格', N'#', N'V         ')
, (N'17        ', N'351       ', N'طالب حقل', N'#', N'V         ')
, (N'18        ', N'351       ', N'الطلاب لإدخال البيانات في الاستمارة', N'#', N'V         ')
, (N'9         ', N'207       ', N'Domaines d''étudiants', N'#', N'V         ')
, (N'10        ', N'207       ', N'Etudiant Entrée de données Forme', N'#', N'V         ')
, (N'11        ', N'255       ', N'Студенческие Поля', N'#', N'V         ')
, (N'12        ', N'255       ', N'Студенческие Data Entry форма', N'#', N'V         ')
, (N'13        ', N'303       ', N'Estudante Campos', N'#', N'V         ')
, (N'14        ', N'303       ', N'Estudante Dados Entrada Forma', N'#', N'V         ')
, (N'85        ', N'15        ', N'De Datos del Estudiante forma de la pantalla', N'Student\\ViewFormLayout.aspx', N'V         ')
, (N'86        ', N'63        ', N'学生のデータフォームの表示', N'Student\\ViewFormLayout.aspx', N'V         ')
, (N'87        ', N'111       ', N'Studente Data Display Form', N'Student\\ViewFormLayout.aspx', N'V         ')
, (N'18        ', N'213       ', N'Curso de Administrador de', N'UnderConstruction.aspx', N'V         ')
, (N'19        ', N'213       ', N'Catálogo de curso', N'UnderConstruction.aspx', N'V         ')
, (N'20        ', N'213       ', N'Imprimir Catálogo de Plazo', N'UnderConstruction.aspx', N'V         ')
, (N'21        ', N'213       ', N'Imprimir Todos los cursos', N'UnderConstruction.aspx', N'V         ')
, (N'88        ', N'159       ', N'Student Data Anzeige Form', N'Student\\ViewFormLayout.aspx', N'V         ')
, (N'89        ', N'399       ', N'학생 데이터 표시 서식', N'#', N'V         ')
, (N'90        ', N'447       ', N'学生数据显示表', N'#', N'V         ')
, (N'25        ', N'214       ', N'Corso di Gerente', N'UnderConstruction.aspx', N'V         ')
, (N'26        ', N'214       ', N'Catalogo dei corsi', N'UnderConstruction.aspx', N'V         ')
, (N'27        ', N'214       ', N'Stampa Catalogo dal termine', N'UnderConstruction.aspx', N'V         ')
, (N'28        ', N'214       ', N'Stampa Tutti i corsi', N'UnderConstruction.aspx', N'V         ')
, (N'91        ', N'351       ', N'عرض نموذج بيانات الطالب', N'#', N'V         ')
, (N'92        ', N'207       ', N'Etudiant Data Afficher Forme', N'#', N'V         ')
, (N'93        ', N'255       ', N'Студенческие данные Display Form', N'#', N'V         ')
, (N'32        ', N'215       ', N'Kurs-Manager ', N'UnderConstruction.aspx', N'V         ')
, (N'33        ', N'215       ', N'Kurskatalog ', N'UnderConstruction.aspx', N'V         ')
, (N'34        ', N'215       ', N'Print-Katalog per Begriff', N'UnderConstruction.aspx', N'V         ')
, (N'35        ', N'215       ', N'Drucken Alle Kurs', N'UnderConstruction.aspx', N'V         ')
, (N'94        ', N'303       ', N'Estudante Data Display Form', N'#', N'V         ')
, (N'96        ', N'497       ', N'Personal de Campos', N'UnderConstruction.aspx', N'V         ')
, (N'97        ', N'497       ', N'Personal Datos Entrada Forma', N'UnderConstruction.aspx', N'V         ')
, (N'39        ', N'201       ', N'Gestionnaire de parcours', N'UnderConstruction.aspx', N'V         ')
, (N'40        ', N'201       ', N'Catalogue des cours', N'UnderConstruction.aspx', N'V         ')
, (N'41        ', N'201       ', N'Imprimer Catalogue par terme', N'UnderConstruction.aspx', N'V         ')
, (N'42        ', N'201       ', N'Imprimer tous les cours', N'UnderConstruction.aspx', N'V         ')
, (N'98        ', N'497       ', N'Personal Datos Exponer Forma', N'UnderConstruction.aspx', N'V         ')
, (N'99        ', N'495       ', N'En Breve', N'UnderConstruction.aspx', N'V         ')
, (N'100       ', N'496       ', N'En Breve', N'UnderConstruction.aspx', N'V         ')
, (N'46        ', N'249       ', N'Курс менеджер', N'UnderConstruction.aspx', N'V         ')
, (N'47        ', N'249       ', N'Каталог курсов', N'UnderConstruction.aspx', N'V         ')
, (N'48        ', N'249       ', N'Версия для печати Каталог сроком', N'UnderConstruction.aspx', N'V         ')
, (N'49        ', N'249       ', N'Печать всех курсов', N'UnderConstruction.aspx', N'V         ')
, (N'101       ', N'503       ', N'Staff Campi', N'UnderConstruction.aspx', N'V         ')
, (N'102       ', N'503       ', N'Personale Dati Registrazione Forma', N'UnderConstruction.aspx', N'V         ')
, (N'103       ', N'503       ', N'Personale Dati Visualizzare Forma', N'UnderConstruction.aspx', N'V         ')
, (N'53        ', N'297       ', N'Curso Gerente', N'UnderConstruction.aspx', N'V         ')
, (N'54        ', N'297       ', N'Curso Catálogo ', N'UnderConstruction.aspx', N'V         ')
, (N'55        ', N'297       ', N'Imprimir Catálogo pelo Termo', N'UnderConstruction.aspx', N'V         ')
, (N'56        ', N'297       ', N'Imprimir Todos os Cursos', N'UnderConstruction.aspx', N'V         ')
, (N'104       ', N'501       ', N'Coming Presto', N'UnderConstruction.aspx', N'V         ')
, (N'105       ', N'502       ', N'Coming Presto', N'UnderConstruction.aspx', N'V         ')
, (N'106       ', N'509       ', N'Mitarbeiter Bereiche', N'UnderConstruction.aspx', N'V         ')
, (N'60        ', N'57        ', N'コースマネージャ', N'UnderConstruction.aspx', N'V         ')
, (N'61        ', N'57        ', N'コースカタログ', N'UnderConstruction.aspx', N'V         ')
, (N'62        ', N'57        ', N'印刷カタログ〜によって用語', N'UnderConstruction.aspx', N'V         ')
, (N'63        ', N'57        ', N'印刷する全てのコース', N'UnderConstruction.aspx', N'V         ')
, (N'107       ', N'509       ', N'Personal Data Eintrag Form', N'UnderConstruction.aspx', N'V         ')
, (N'108       ', N'509       ', N'Personal Data Anzeige Form', N'UnderConstruction.aspx', N'V         ')
, (N'109       ', N'507       ', N'Coming Bald', N'UnderConstruction.aspx', N'V         ')
, (N'67        ', N'393       ', N'코스 관리자', N'UnderConstruction.aspx', N'V         ')
, (N'68        ', N'393       ', N'과정 카탈로그', N'UnderConstruction.aspx', N'V         ')
, (N'69        ', N'393       ', N'인쇄 카탈로그 경계주', N'UnderConstruction.aspx', N'V         ')
, (N'70        ', N'393       ', N'인쇄 모두 과정', N'UnderConstruction.aspx', N'V         ')
, (N'110       ', N'508       ', N'Coming Bald', N'UnderConstruction.aspx', N'V         ')
, (N'111       ', N'515       ', N'Personnel Domaines', N'UnderConstruction.aspx', N'V         ')
, (N'112       ', N'515       ', N'Personnel Data Entrée Forme', N'UnderConstruction.aspx', N'V         ')
, (N'74        ', N'441       ', N'课程经理', N'UnderConstruction.aspx', N'V         ')
, (N'75        ', N'441       ', N'课程目录', N'UnderConstruction.aspx', N'V         ')
, (N'76        ', N'441       ', N'打印商品目录通过任期', N'UnderConstruction.aspx', N'V         ')
, (N'77        ', N'441       ', N'打印所有课程', N'UnderConstruction.aspx', N'V         ')
, (N'113       ', N'515       ', N'Personnel Data Afficher Forme', N'UnderConstruction.aspx', N'V         ')
, (N'114       ', N'513       ', N'Coming Bientôt', N'UnderConstruction.aspx', N'V         ')
, (N'115       ', N'514       ', N'Coming Bientôt', N'UnderConstruction.aspx', N'V         ')
, (N'81        ', N'345       ', N'دورة تدريبية مدير', N'UnderConstruction.aspx', N'V         ')
, (N'82        ', N'345       ', N'طبعا الكتالوج', N'UnderConstruction.aspx', N'V         ')
, (N'83        ', N'345       ', N'طباعة كتالوج به الأجل', N'UnderConstruction.aspx', N'V         ')
, (N'84        ', N'345       ', N'طباعة جميع الدورات', N'UnderConstruction.aspx', N'V         ')
, (N'116       ', N'521       ', N'сотрудников полей', N'UnderConstruction.aspx', N'V         ')
, (N'117       ', N'521       ', N'Персонал Данные Вступлению Форм', N'UnderConstruction.aspx', N'V         ')
, (N'118       ', N'521       ', N'Персонал Данные Отображать Форм', N'UnderConstruction.aspx', N'V         ')
, (N'119       ', N'519       ', N'приход Скоро', N'UnderConstruction.aspx', N'V         ')
, (N'120       ', N'520       ', N'приход Скоро', N'UnderConstruction.aspx', N'V         ')
, (N'121       ', N'527       ', N'スタッフフィールド', N'UnderConstruction.aspx', N'V         ')
, (N'122       ', N'527       ', N'スタッフデータ入力フォーム', N'UnderConstruction.aspx', N'V         ')
, (N'123       ', N'527       ', N'スタッフデータフォームの表示', N'UnderConstruction.aspx', N'V         ')
, (N'124       ', N'525       ', N'近日販売開始', N'UnderConstruction.aspx', N'V         ')
, (N'125       ', N'526       ', N'近日販売開始', N'UnderConstruction.aspx', N'V         ')
, (N'126       ', N'533       ', N'직원 필드', N'UnderConstruction.aspx', N'V         ')

, (N'127       ', N'533       ', N'직원의 데이터 입력 양식', N'UnderConstruction.aspx', N'V         ')
, (N'128       ', N'533       ', N'직원 데이터를 표시 양식', N'UnderConstruction.aspx', N'V         ')
, (N'129       ', N'531       ', N'출시예정', N'UnderConstruction.aspx', N'V         ')
, (N'130       ', N'532       ', N'출시예정', N'UnderConstruction.aspx', N'V         ')
, (N'131       ', N'539       ', N'Funcionários Fields', N'UnderConstruction.aspx', N'V         ')
, (N'132       ', N'539       ', N'Funcionários Dados Entrada Forma', N'UnderConstruction.aspx', N'V         ')
, (N'133       ', N'539       ', N'Funcionários Dados Exibir Forma', N'UnderConstruction.aspx', N'V         ')
, (N'134       ', N'537       ', N'Brevemente', N'UnderConstruction.aspx', N'V         ')
, (N'135       ', N'538       ', N'Brevemente', N'UnderConstruction.aspx', N'V         ')
, (N'136       ', N'545       ', N'موظفو الحقول', N'UnderConstruction.aspx', N'V         ')
, (N'137       ', N'545       ', N'نموذج إدخال بيانات الموظفين', N'UnderConstruction.aspx', N'V         ')
, (N'138       ', N'545       ', N'عرض نموذج بيانات الموظفين', N'UnderConstruction.aspx', N'V         ')
, (N'139       ', N'543       ', N'قريبا', N'UnderConstruction.aspx', N'V         ')
, (N'140       ', N'544       ', N'قريبا', N'UnderConstruction.aspx', N'V         ')
, (N'141       ', N'551       ', N'员工字段', N'UnderConstruction.aspx', N'V         ')
, (N'142       ', N'551       ', N'工作人员报名表数据', N'UnderConstruction.aspx', N'V         ')
, (N'143       ', N'551       ', N'员工数据显示表', N'UnderConstruction.aspx', N'V         ')
, (N'144       ', N'549       ', N'即将推出', N'UnderConstruction.aspx', N'V         ')
, (N'145       ', N'550       ', N'即将推出', N'UnderConstruction.aspx', N'V         ')


#ENGINE = INNODB;

INSERT studentsetup_controls (control_id, control_name) VALUES (1, 'TextBox')
, (2, 'CheckBox')
, (3, 'RadioButto')
, (4, 'DropDownList')
, (5, 'Label')


#ENGINE = INNODB;

INSERT `Main_SubMenu_Child` (`Main_SubMenu_Child_Id`, `Main_SubMenu_ID`, `Main_SubMenu_Child_Header`, `Url`, `visible`) VALUES(1, 15, N'Student Fields', N'Student\StudentSetup.aspx', N'V')
, (2, 15, N'Student Data Entry Form', N'Student\\EntryFormLayout.aspx', N'V')
, (7, 15, N'Student Data Display Form', N'Student\\ViewFormLayout.aspx', N'V')
, (8, 56, N'Staff Fields', N'UnderConstruction.aspx', N'V')
, (9, 56, N'Staff Data Entry Form', N'UnderConstruction.aspx', N'V')
, (3, 50, N'Course Manager', N'UnderConstruction.aspx', N'V')
, (4, 50, N'Course Catalog', N'UnderConstruction.aspx', N'V')
, (5, 50, N'Print Catalog by Term', N'UnderConstruction.aspx', N'V')
, (6, 50, N'Print All Course', N'UnderConstruction.aspx', N'V')
, (10, 56, N'Staff Data Display Form', N'UnderConstruction.aspx', N'V')
, (11, 54, N'Coming Soon', N'UnderConstruction.aspx', N'V')
, (12, 55, N'Coming Soon', N'UnderConstruction.aspx', N'V')


#ENGINE = INNODB;






INSERT `Main_SubMenu` (`Main_SubMenu_ID`, `Main_menu_ID`, `Main_SubMenu_Header`, `Url`, `visible`) VALUES (1, 2, N'Portal Notes', N'School\PortalNotes.aspx', N'V')
, (2, 2, N'School Information', N'School\\SchoolDetails.aspx', N'V')
, (3, 2, N'Add a School', N'School\\SchoolDetails.aspx', N'I')
, (4, 2, N'Copy School ', N'UnderConstruction.aspx', N'I')
, (5, 2, N'Marking Periods', N'School\\MarkingPeriods.aspx', N'V')
, (6, 2, N'Calendars', N'Calendar\\Index.aspx', N'V')
, (7, 2, N'Periods', N'School\\Period.aspx', N'V')
, (8, 2, N'Grade Levels', N'School\\GradeLevel.aspx', N'V')
, (50, 2, N'Courses', N'UnderConstruction.aspx', N'V')
, (10, 3, N'Student Info', N'Student\\StudentInfo.aspx', N'V')
, (11, 3, N'Add a Student', N'Student\AddStudent.aspx', N'V')
, (12, 3, N'Group Assign Student Info', N'UnderConstruction.aspx', N'V')
, (13, 3, N'Associate Parents with Students', N'UnderConstruction.aspx', N'V')
, (14, 3, N'Reports', N'UnderConstruction.aspx', N'V')
, (15, 3, N'Setup', N'Student\\StudentSetup.aspx', N'V')
, (16, 4, N'User Info', N'UnderConstruction.aspx', N'V')
, (17, 4, N'Add a User ', N'UnderConstruction.aspx', N'V')
, (18, 4, N'Associate Students with Parents', N'UnderConstruction.aspx', N'V')
, (19, 4, N'Preferences', N'UnderConstruction.aspx', N'V')
, (20, 4, N'Setup', N'UnderConstruction.aspx', N'V')
, (21, 4, N'Teacher Programs', N'UnderConstruction.aspx', N'V')
, (22, 5, N'Student Schedule', N'UnderConstruction.aspx', N'V')
, (23, 5, N'Student Requests', N'UnderConstruction.aspx', N'V')
, (24, 5, N'Group Schedule', N'UnderConstruction.aspx', N'V')
, (25, 5, N'Group Requests', N'UnderConstruction.aspx', N'V')
, (26, 5, N'Group Drops', N'UnderConstruction.aspx', N'V')
, (27, 5, N'Reports', N'UnderConstruction.aspx', N'V')
, (28, 5, N'Setup', N'UnderConstruction.aspx', N'V')
, (29, 6, N'Report Cards', N'UnderConstruction.aspx', N'V')
, (30, 6, N'Calculate GPA ', N'UnderConstruction.aspx', N'V')
, (31, 6, N'Transcripts ', N'UnderConstruction.aspx', N'V')
, (32, 6, N'Fast Transcripts ', N'UnderConstruction.aspx', N'V')
, (33, 6, N'Reports', N'UnderConstruction.aspx', N'V')
, (34, 6, N'Setup', N'UnderConstruction.aspx', N'V')
, (35, 6, N'Utilities', N'UnderConstruction.aspx', N'V')
, (36, 7, N'Administration', N'UnderConstruction.aspx', N'V')
, (37, 7, N'Add Absences ', N'UnderConstruction.aspx', N'V')
, (38, 7, N' Reports', N'UnderConstruction.aspx', N'V')
, (39, 7, N' Utilities', N'UnderConstruction.aspx', N'V')
, (40, 7, N' Setup', N'UnderConstruction.aspx', N'V')
, (41, 8, N'Student Screen', N'UnderConstruction.aspx', N'V')
, (42, 8, N'Add Activity', N'UnderConstruction.aspx', N'V')
, (43, 8, N' Reports', N'UnderConstruction.aspx', N'V')
, (44, 8, N'Setup', N'UnderConstruction.aspx', N'V')
, (45, 9, N'Backup Database', N'UnderConstruction.aspx', N'V')
, (46, 9, N' Restore Database', N'UnderConstruction.aspx', N'V')

, (49, 9, N'Rollover', N'UnderConstruction.aspx', N'V')
, (51, 11, N'Staff Info', N'Staff\\StaffInfo.aspx', N'V')
, (52, 11, N'Add New Staff', N'Staff\\AddStaff.aspx', N'V')
, (53, 11, N'Preferences', N'UnderConstruction.aspx', N'V')
, (54, 11, N'Staff Reports', N'UnderConstruction.aspx', N'V')
, (56, 11, N'Setup', N'UnderConstruction.aspx', N'V')
, (55, 11, N'Teacher Programs  ', N'UnderConstruction.aspx', N'V')

#ENGINE = INNODB;


INSERT Student_Setup_Additional_Default_Contact_Field (Cont_Id, Field_Name, Field_Type, Status) VALUES (1, N'Contact Relationship', 4, N'M')
, (2, N'First Name', 1, N'M')
, (3, N'Last Name', 1, N'M')
, (4, N'Home phone', 1, N'N')
, (5, N'Work phone', 1, N'N')
, (6, N'Mobile/Cell phone', 1, N'N')
, (7, N'Email address', 1, N'N')
, (8, N'Custody indicator', 1, N'N')


#ENGINE = INNODB

INSERT Student_Setup_Category (Cat_Id, Cat_Name, Default_Cat) VALUES (1, N'Demographic Info&nbsp;&nbsp;&nbsp;&nbsp;', N'D')
, (2, N'Access Info&nbsp;&nbsp;&nbsp;&nbsp;', N'D')
, (3, N'Address & Contact&nbsp;&nbsp;&nbsp;&nbsp;', N'D')
, (4, N'School & Enrollment&nbsp;&nbsp;&nbsp;&nbsp;', N'D')
, (5, N'Health & Immunization&nbsp;&nbsp;&nbsp;&nbsp;', N'D')
, (6, N'Testing/Assessment&nbsp;&nbsp;&nbsp;&nbsp;', N'D')
, (7, N'Discipline&nbsp;&nbsp;&nbsp;&nbsp;', NULL)
#ENGINE = INNODB


INSERT Student_Setup_Default_Field (Def_Field_Id, field_name, Cat_Id, Field_Type, Status, DefaultField) VALUES (1, N'Student/School ID', 1, 1, N'M', N'D')
, (2, N'Alternate ID', 1, 1, N'N', N'D')
, (3, N'State/Govt ID', 1, 1, N'N', N'D')
, (4, N'District ID', 1, 1, N'N', N'D')
, (5, N'First Name', 1, 1, N'M', N'D')
, (6, N'Middle Name', 1, 1, N'N', N'D')
, (7, N'Last Name', 1, 1, N'M', N'D')
, (8, N'Nickname/Common Name', 1, 1, N'N', N'D')
, (9, N'Suffix', 1, 1, N'N', N'D')
, (10, N'Gender', 1, 3, N'M', N'D')
, (11, N'Ethnicity', 1, 4, N'N', N'D')
, (12, N'SSN', 1, 1, N'N', N'D')
, (13, N'DOB', 1, 1, N'M', N'D')
, (14, N'Age', 1, 5, N'N', N'D')
, (15, N'Primary Language', 1, 4, N'N', N'D')
, (16, N'Secondary language', 1, 4, N'N', N'D')
, (17, N'Immigration status', 1, 1, N'N', N'D')
, (18, N'Citizenship', 1, 4, N'N', N'D')
, (19, N'Counselor''s Name', 1, 1, N'N', N'D')
, (20, N'Active Status', 1, 1, N'M', N'D')
, (21, N'Special Education Code ', 1, 1, N'N', N'D')
, (22, N'Disability', 1, 1, N'N', N'D')
, (23, N'Special Education Case Manager                        ', 1, 1, N'N', N'D')
, (24, N'Hours in Special Education Classes                        ', 1, 1, N'N', N'D')
, (25, N'Student''s phone number', 1, 1, N'N', N'D')
, (26, N'Student school Email Address                        ', 1, 1, N'N', N'D')
, (27, N'Student''s personal email address', 1, 1, N'N', N'D')
, (28, N'Instant message ID', 1, 1, N'N', N'D')
, (29, N'Twitter address', 1, 1, N'N', N'D')
, (30, N'Sports Eligibility                        ', 1, 1, N'N', N'D')
, (31, N'Transportation Aid Field                        ', 1, 1, N'N', N'D')
, (32, N'Bus RouteAM                        ', 1, 1, N'N', N'D')
, (33, N'Bus RoutePM                        ', 1, 1, N'N', N'D')
, (34, N'PK Experience                        ', 1, 1, N'N', N'D')
, (35, N'Previous School', 1, 1, N'N', N'D')
, (36, N'Next School', 1, 1, N'N', N'D')
, (37, N'Dropout Reason                        ', 1, 1, N'N', N'D')
, (38, N'Current Homeroom                        ', 1, 1, N'N', N'D')
, (39, N'Parttime or Fulltime Status                        ', 1, 1, N'M', N'D')
, (40, N'Current Sports Eligibility                        ', 1, 1, N'N', N'D')
, (41, N'Deny Tags                        ', 1, 1, N'N', N'D')
, (42, N'Birth city', 1, 1, N'N', N'D')
, (43, N'Birth State', 1, 1, N'N', N'D')
, (44, N'Birth country', 1, 1, N'N', N'D')
, (45, N'English as Second Language (LEP Code)                        ', 1, 1, N'N', N'D')
, (46, N'Length of Time in US ', 1, 1, N'N', N'D')
, (47, N'Reduced or freelunch eligibility?', 1, 1, N'N', N'D')
, (48, N'Free Lunch code', 1, 1, N'N', N'D')
, (49, N'Food Service Code                        ', 1, 1, N'N', N'D')
, (50, N'Truancy Conferences                        ', 1, 1, N'N', N'D')
, (51, N'Migrant Status                        ', 1, 1, N'N', N'D')
, (52, N'Mobility Information (transfers, withdrawals, dropout information)                        ', 1, 1, N'N', N'D')
, (53, N'Medicaid Information                        ', 1, 1, N'N', N'D')
, (54, N'Student Photograph                        ', 1, 1, N'N', N'D')
, (55, N'Locker Information', 1, 1, N'N', N'D')
, (56, N'Locker combination', 1, 1, N'N', N'D')
, (57, N'Zone grid', 1, 1, N'N', N'D')
, (58, N'Educational Functioning Level', 1, 1, N'N', N'D')
, (59, N'LEP', 1, 1, N'N', N'D')
, (60, N'EllPrgPart', 1, 1, N'N', N'D')
, (61, N'LEPEntryDt', 1, 1, N'N', N'D')
, (62, N'BasisEntry', 1, 1, N'N', N'D')
, (63, N'StuPlanDt', 1, 1, N'N', N'D')
, (64, N'ClassifDt', 1, 1, N'N', N'D')
, (65, N'ExtofInstr', 1, 1, N'N', N'D')
, (66, N'ReEvalDt', 1, 1, N'N', N'D')
, (67, N'ExitDt', 1, 1, N'N', N'D')
, (68, N'BasisExit', 1, 1, N'N', N'D')
, (69, N'ReclassDt', 1, 1, N'N', N'D')
, (70, N'Access Status', 2, 1, N'M', N'D')
, (71, N'Username', 2, 1, N'N', N'D')
, (72, N'Password', 2, 1, N'N', N'D')
, (73, N'Secret question', 2, 1, N'N', N'D')
, (74, N'Answer', 2, 1, N'N', N'D')
, (75, N'Blog address', 2, 1, N'N', N'D')
, (106, N'First time student', 4, 4, N'N', N'D')
, (107, N'Enrollment date', 4, 1, N'M', N'D')
, (108, N'Grade enrolled', 4, 1, N'M', N'D')
, (109, N'Current Grade', 4, 1, N'N', N'D')
, (110, N'Calender', 4, 4, N'M', N'D')
, (111, N'Term GPA', 4, 5, N'N', N'D')
, (112, N'Cumulative GPA', 4, 5, N'N', N'D')
, (113, N'Class rank numeric', 4, 5, N'N', N'D')
, (114, N'Class rank percentile', 4, 5, N'N', N'D')
, (115, N'Gifted student indicator', 4, 4, N'N', N'D')
, (116, N'Gifted program name', 4, 1, N'N', N'D')
, (117, N'Estimated Graduation Date', 4, 1, N'N', N'D')
, (118, N'Rolling/Retention options', 4, 4, N'N', N'D')
, (119, N'Attendance Start Date this School Year', 4, 1, N'M', N'D')
, (120, N'Start Condition    ', 4, 4, N'N', N'D')
, (121, N'Early Admisson ', 4, 1, N'N', N'D')
, (122, N'End Year Status', 4, 1, N'N', N'D')
, (123, N'Graduation Date', 4, 1, N'N', N'D')
, (124, N'Transcript - DiplomaType', 4, 1, N'N', N'D')
, (125, N'Transcript - Grad Pgrm', 4, 1, N'N', N'D')
, (126, N'Diploma Type', 4, 1, N'N', N'D')
, (127, N'Diploma Date', 4, 1, N'N', N'D')
, (128, N'Certificate Type', 4, 1, N'N', N'D')
, (129, N'Cert Comp Date', 4, 1, N'N', N'D')
, (130, N'Community Service  Hours', 4, 1, N'N', N'D')
, (131, N'National Merit Scholar', 4, 1, N'N', N'D')

, (132, N'National Achieve Scholar', 4, 1, N'N', N'D')
, (133, N'National Hispanic Scholar', 4, 1, N'N', N'D')
, (134, N'Adv International Cert Pr', 4, 1, N'N', N'D')
, (135, N'Int Bacalaureate Diploma', 4, 1, N'N', N'D')
, (136, N'Colllege Ready Diploma', 4, 1, N'N', N'D')
, (137, N'Differentiated Diploma', 4, 1, N'N', N'D')
, (138, N'College/Military Info Opt', 4, 1, N'N', N'D')
, (139, N'Special Diploma', 4, 1, N'N', N'D')
, (140, N'Ged Exit Opt Test Result', 4, 1, N'N', N'D')
, (141, N'Withdrawal/Exit code', 4, 1, N'N', N'D')
, (142, N'Withdrawal/Exit date', 4, 1, N'N', N'D')
, (143, N'Withdrawal/Exit reason', 4, 1, N'N', N'D')
, (144, N'Vaccine certificate expiry date', 5, 1, N'N', N'D')
, (145, N'Vaccination Name', 5, 1, N'N', N'D')
, (146, N'Vaccination Date', 5, 1, N'N', N'D')
, (147, N'Test name', 6, 1, N'N', N'D')
, (148, N'Test date', 6, 1, N'N', N'D')
, (149, N'Score', 6, 1, N'N', N'D')
, (150, N'Grade level during testing', 6, 1, N'N', N'D')
, (151, N'Comments', 6, 1, N'N', N'D')
, (152, N'Student''s Home Address', 3, 6, N'N', N'D')
, (153, N'Student''s Mailing Address', 3, 6, N'N', N'D')
, (154, N'Primary Emergency Contact', 3, 6, N'N', N'D')
, (155, N'Secondary Emergency Contact', 3, 6, N'N', N'D')
, (156, N'Economic disadvantage flag', 4, 1, N'N', N'D')
, (157, N'Homeless Flag', 4, 5, N'N', N'D')
, (158, N'Homeless status', 4, 5, N'N', N'D')
, (159, N'Student Alias First Name', 1, 1, N'N', N'D')
, (160, N'Student Alias Last Name', 1, 1, N'N', N'D')
, (161, N'Special Education Indicator ', 1, 1, N'N', N'D')
, (162, N'504 Eligibility', 1, 1, N'N', N'D')
, (163, N'web page or blog address', 1, 1, N'N', N'D')
, (164, N'Homeroom Teacher ', 1, 1, N'N', N'D')
, (165, N'Retype Password', 2, 1, N'M', N'D')
, (166, N'Last Access Date & Time', 2, 5, N'M', N'D')
, (167, N'Enrollment Status', 4, 1, N'N', N'D')
, (168, N'Gifted Category', 4, 4, N'N', N'D')
, (169, N'Program start date', 4, 1, N'N', N'D')
, (170, N'Program end date', 4, 1, N'N', N'D')
, (171, N'Exit reason', 4, 1, N'N', N'D')
, (172, N'Vaccination Code', 5, 1, N'N', N'D')
, (173, N'Waiver', 5, 1, N'N', N'D')
, (174, N'Homeroom teacher', 6, 1, N'N', N'D')
, (175, N'Incident ID ', 7, 1, N'N', N'D')
, (176, N'Date of occurance', 7, 1, N'N', N'D')
, (177, N'Time of Occurance', 7, 1, N'N', N'D')
, (178, N'Referring Staff', 7, 1, N'N', N'D')
, (179, N'Staff Title', 7, 1, N'N', N'D')
, (180, N'Incident Location', 7, 2, N'N', N'D')
, (181, N'Student Offense ', 7, 2, N'N', N'D')
, (182, N'Incident Most Severe Offense ', 7, 2, N'N', N'D')
, (183, N'Weapon Involved?', 7, 3, N'N', N'D')
, (184, N'Possible Motivation', 7, 2, N'N', N'D')
, (185, N'Others involved', 7, 1, N'N', N'D')
, (186, N'Others involved not in system', 7, 1, N'N', N'D')
, (187, N'Disciplinary Action Taken ', 7, 2, N'N', N'D')
, (188, N'Disciplinary Action Duration Days', 7, 1, N'N', N'D')
, (189, N'Student Instructional Support Indicator', 7, 3, N'N', N'D')
, (190, N'Student Truant Indicator', 7, 3, N'N', N'D')
, (191, N'Comments', 7, 3, N'N', N'D')

#ENGINE = INNODB

INSERT Student_Setup_Address_Field (Add_Id, Field_Name, Def_Field_Id, Field_Type, Status, Emergency) VALUES (1, N'Home address 1', 152, 1, N'M', NULL)
, (2, N'Home address 2', 152, 1, N'N', NULL)
, (3, N'Home City', 152, 1, N'M', NULL)
, (4, N'Home State', 152, 4, N'M', NULL)
, (5, N'Home Zip', 152, 1, N'M', NULL)
, (6, N'Home phone', 152, 1, N'M', NULL)
, (7, N'Grid code', 152, 1, N'N', NULL)
, (8, N'School bus pickup indicator', 152, 1, N'N', NULL)
, (9, N'School bus drop off', 152, 1, N'N', NULL)
, (10, N'Mailing address 1', 153, 1, N'N', NULL)
, (11, N'Mailing address 2', 153, 1, N'N', NULL)
, (12, N'Mailing City', 153, 1, N'N', NULL)
, (13, N'Mailing State', 153, 4, N'N', NULL)
, (14, N'Mailing Zip', 153, 1, N'N', NULL)
, (15, N'Contact Relationship', 154, 4, N'M', NULL)
, (16, N'Prefix', 154, 1, N'N', NULL)
, (17, N'First Name', 154, 1, N'M', NULL)
, (18, N'Middle Name', 154, 1, N'N', NULL)
, (19, N'Last Name', 154, 1, N'M', NULL)
, (20, N'Suffix', 154, 1, N'N', NULL)
, (21, N'Address 1', 154, 1, N'M', NULL)
, (22, N'Address2', 154, 1, N'N', NULL)
, (23, N'City', 154, 1, N'M', NULL)
, (24, N'State', 154, 4, N'M', NULL)
, (25, N'Zip', 154, 1, N'M', NULL)
, (26, N'Home phone', 154, 1, N'M', NULL)
, (27, N'Work phone', 154, 1, N'N', NULL)
, (28, N'Mobile/Cell phone', 154, 1, N'N', NULL)
, (29, N'Email address', 154, 1, N'N', NULL)
, (30, N'Custody indicator', 154, 1, N'N', NULL)
, (31, N'Contact Relationship', 155, 4, N'M', NULL)
, (32, N'Prefix', 155, 1, N'N', NULL)
, (33, N'First Name', 155, 1, N'M', NULL)
, (34, N'Middle Name', 155, 1, N'N', NULL)
, (35, N'Last Name', 155, 1, N'M', NULL)
, (36, N'Suffix', 155, 1, N'N', NULL)
, (37, N'Address 1', 155, 1, N'M', NULL)
, (38, N'Address2', 155, 1, N'N', NULL)
, (39, N'City', 155, 1, N'M', NULL)
, (40, N'State', 155, 4, N'M', NULL)
, (41, N'Zip', 155, 1, N'M', NULL)
, (42, N'Home phone', 155, 1, N'M', NULL)
, (43, N'Work phone', 155, 1, N'N', NULL)
, (44, N'Mobile/Cell phone', 155, 1, N'N', NULL)
, (45, N'Email address', 155, 1, N'N', NULL)
, (46, N'Custody indicator', 155, 1, N'N', NULL)

#ENGINE = INNODB


INSERT phone_type (phn_type_id, phn_type_cd, phn_type_nm) VALUES (1, N'OP', N'Office Phone' )
,(2, N'HP', N'Home Phone' )
,(3, N'CP', N'Cell Phone' )

#ENGINE = INNODB

CREATE PROCEDURE `getmax`(id varchar(200),tablename varchar(200))
BEGIN

SET @s = CONCAT('select ifnull(max(' ,id,'),0) +1 as maxid from ',tablename,'');
PREPARE stmt FROM @s;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;

END 


#ENGINE = INNODB;


CREATE PROCEDURE `checkadditionaladdressfieldfromstatustable`(in_def_field_id int,in_sch_id int)
BEGIN

select COUNT(*) as count from Student_Setup_Additional_Contact_Status where Cont_Id =in_def_field_id and Sch_Id= in_sch_id;



END

#ENGINE = INNODB;



CREATE PROCEDURE `checkadditionalcontactlist` (in_def_field_id int,in_sch_id int)
BEGIN


select COUNT(*) as count from Student_Setup_Additional_Contact_List where Def_Field_Id = in_def_field_id and Sch_Id= in_sch_id;


END

#ENGINE = INNODB;

CREATE PROCEDURE `checkaddressfieldfromstatustable` (in_def_field_id int,in_sch_id int)
BEGIN


select COUNT(*) as count from Student_Setup_Address_Default_Field_Status where Add_Id= in_def_field_id  and Sch_Id= in_sch_id;


END

#ENGINE = INNODB;

CREATE PROCEDURE `checkdefaultaddressfieldcount` (in_def_field_id int)
BEGIN


select COUNT(*) as count from Student_Setup_Address_Field where Def_Field_Id= in_def_field_id;


END

#ENGINE = INNODB;


CREATE PROCEDURE `checkdefaultfieldcount` (in_def_field_id int,in_sch_id int)
BEGIN

 select COUNT(*) as count from Student_Setup_Default_Field_Status where Default_Field_Id= in_def_field_id and School_Id= in_sch_id;

END

#ENGINE = INNODB;






CREATE PROCEDURE `getaddressfieldsbyfieldid` (in_def_field_id int,in_sch_id int)

BEGIN


select SSAF.Add_Id as FieldId,SSAF.Field_name as FieldName,SSAF.Field_Type as FieldType,SSADFS.Status as Status,SSAF.Status as IsMandatory,SSDF.DefaultField as Default_Custom,SSADFS.Field_View from Student_Setup_Address_Field SSAF left outer join(select * from Student_Setup_Address_Default_Field_Status  where Sch_Id = in_sch_id )as SSADFS on SSAF.Add_Id=SSADFS.Add_Id left outer join(select * from Student_Setup_Default_Field where Def_Field_Id= in_def_field_id) SSDF on SSAF.Def_Field_Id=SSDF.Def_Field_Id WHERE SSAF.Def_Field_Id= in_def_field_id;


END

#ENGINE = INNODB;


CREATE PROCEDURE `getfieldsbycategory` (in_cat_id int,in_sch_id int)
BEGIN


select SSDF.Def_Field_Id as FieldId,SSDF.field_name as FieldName,SSDF.Field_Type as FieldType,SSDFS.Status as Status,SSDF.DefaultField as Default_Custom,SSDF.Status as IsMandatory,SSDFS.Field_View from Student_Setup_Default_Field SSDF left outer join(select * from Student_Setup_Default_Field_Status  where School_Id = in_sch_id)as SSDFS on SSDF.Def_Field_Id=SSDFS.Default_Field_Id WHERE SSDF.Cat_Id= in_cat_id
union
select SSCF.extrafield_id as FieldId, SSCF.field_name as FieldName,SSCF.field_type_id as FieldType,SSCF.Status as Status,SSCF.CustomField as Default_Custom,'' as IsMandatory,SSCF.Field_View from Student_Setup_Custom_Field  SSCF where Category_Id= in_cat_id  and sch_id= in_sch_id order by Default_Custom desc;

END

#ENGINE = INNODB;



CREATE PROCEDURE `insertadditionaladdressfieldstatus`(status_id int,cont_id int,status char(1),sch_id int,field_view char(10))
BEGIN


insert into Student_Setup_Additional_Contact_Status(Status_Id,Cont_Id,Status,Sch_Id,Field_View) values(status_id,cont_id,status,sch_id,field_view);


END

#ENGINE = INNODB;



CREATE PROCEDURE `insertdefaultaddressfieldstatus` (status_id int,add_id int,status char(1),sch_id int,field_view char(10))
BEGIN


insert into Student_Setup_Address_Default_Field_Status(Status_Id,Add_Id,Status,Sch_Id,Field_View) values(status_id,add_id,status,sch_id,field_view);

END

#ENGINE = INNODB;


CREATE PROCEDURE `insertdefaultfieldstatus` (status_id int,def_field_id int,status char(1),sch_id int,field_view char(10))
BEGIN

insert into Student_Setup_Default_Field_Status(Status_Id,Default_Field_Id,Status,School_Id,Field_View) values(status_id,def_field_id,status,sch_id,field_view);

END

#ENGINE = INNODB;



CREATE PROCEDURE `updateadditionaladdressfieldstatus` (ch_status char(1),def_field_id int,in_sch_id int)
BEGIN


update Student_Setup_Additional_Contact_Status set Status=ch_status where Cont_Id=def_field_id and Sch_Id=in_sch_id;


END

#ENGINE = INNODB;



CREATE PROCEDURE `updateadditionaladdressfieldview` (ch_field_view char(10),def_field_id int,in_sch_id int)
BEGIN

update Student_Setup_Additional_Contact_Status set Field_View=ch_field_view where Cont_Id=def_field_id and Sch_Id=in_sch_id;

END

#ENGINE = INNODB;


CREATE PROCEDURE `updatecustomfieldstatus` (ch_status char(1),def_field_id int)
BEGIN

update Student_Setup_Custom_Field set Status=ch_status where extrafield_id=def_field_id;


END

#ENGINE = INNODB;




CREATE PROCEDURE `updatecustomfieldview` (ch_field_view char(10),def_field_id int)
BEGIN

update Student_Setup_Custom_Field set Field_View=ch_field_view where extrafield_id=def_field_id;


END

#ENGINE = INNODB;



CREATE PROCEDURE `updatedefaultaddressfieldstatus` (ch_status char(1),def_field_id int,in_sch_id int)
BEGIN

update Student_Setup_Address_Default_Field_Status set Status=ch_status where Add_Id=def_field_id and Sch_Id=in_sch_id;

END

#ENGINE = INNODB;


CREATE PROCEDURE `updatedefaultaddressfieldview` (ch_field_view char(10),def_field_id int,in_sch_id int)
BEGIN

update Student_Setup_Address_Default_Field_Status set Field_View=ch_field_view where Add_Id=def_field_id and Sch_Id=in_sch_id;

END

#ENGINE = INNODB;

CREATE PROCEDURE `updatedefaultfieldstatus` (ch_status char(1),def_field_id int,sch_id int)
BEGIN

update Student_Setup_Default_Field_Status set Status=ch_status where Default_Field_Id=def_field_id and School_Id=sch_id;


END

#ENGINE = INNODB;



CREATE PROCEDURE `updatedefaultfieldview` (ch_field_view char(10),def_field_id int,sch_id int)
BEGIN


update Student_Setup_Default_Field_Status set Field_View=ch_field_view where Default_Field_Id=def_field_id and School_Id=sch_id;

END

#ENGINE = INNODB;








CREATE  PROCEDURE `split_string`(IN input TEXT,IN delimiter VARCHAR(10)
)
    SQL SECURITY INVOKER
BEGIN
      DECLARE cur_position INT DEFAULT 1 ;
      DECLARE remainder TEXT;
      DECLARE cur_string VARCHAR(1000);
      DECLARE delimiter_length TINYINT UNSIGNED;
      DROP TEMPORARY TABLE IF EXISTS SplitValues;
      CREATE TEMPORARY TABLE SplitValues (
        value VARCHAR(1000) NOT NULL PRIMARY KEY
        ) ENGINE=MEMORY;


        DROP TEMPORARY TABLE IF EXISTS SplitValues_b;
      CREATE TEMPORARY TABLE SplitValues_b (
        value VARCHAR(1000) NOT NULL PRIMARY KEY
        ) ENGINE=MEMORY;


      SET remainder = input;
      SET delimiter_length = CHAR_LENGTH(delimiter);

       WHILE CHAR_LENGTH(remainder) > 0 AND cur_position > 0 DO
        SET cur_position = INSTR(remainder, delimiter);

      IF cur_position = 0 THEN
        SET cur_string = remainder;
     ELSE
        SET cur_string = LEFT(remainder, cur_position - 1);
        END IF;

      IF TRIM(cur_string) != '' THEN

        INSERT INTO SplitValues VALUES (cur_string);

        INSERT INTO SplitValues_b VALUES (cur_string);
     END IF;

      SET remainder = SUBSTRING(remainder, cur_position + delimiter_length);

      END WHILE;

END 


#ENGINE = INNODB;



CREATE PROCEDURE `getschoolspecificcategory`(in_sch_id int)
BEGIN

    declare l_catid varchar(100);

    select cat_id into l_catid from Student_Setup_School_Specific_Category where sch_id=in_sch_id;

    call split_string(l_catid,',');

    select * from Student_Setup_Category where cat_id in(select value from SplitValues);

END 


#ENGINE = INNODB;



CREATE PROCEDURE `getadditionalcontactfields`(in_def_field_id int,
in_sch_id int)
BEGIN

    declare l_Cont_Id_List varchar(100);

    select Cont_Id_List into l_Cont_Id_List from Student_Setup_Additional_Contact_List
    where Sch_Id=in_sch_id and Def_Field_Id=in_def_field_id;



     call split_string(l_Cont_Id_List,',');



    select SSADCF.Cont_Id as FieldId, SSADCF.Field_Name as FieldName,SSADCF.Field_Type as FieldType,
    SSACS.Status as Status,SSADCF.Status  as IsMandatory,SSCF.CustomField as Default_Custom,
    SSACS.Field_View from Student_Setup_Additional_Default_Contact_Field SSADCF
    left outer join (select * from Student_Setup_Additional_Contact_Status
    where Sch_Id=in_sch_id) as SSACS on SSADCF.Cont_Id=SSACS.Cont_Id
    left outer join Student_Setup_Additional_Contact_List SSACL
    on SSADCF.Cont_Id in (SELECT Value FROM SplitValues)
    left outer join (select * from Student_Setup_Custom_Field where extrafield_id=in_def_field_id) SSCF
    on SSACL.Def_Field_Id=SSCF.extrafield_id
    where SSADCF.Cont_Id
    in (SELECT Value FROM SplitValues_b);

END 
#ENGINE = INNODB;